Expose wc_CheckCertSigPubKey with WOLFSSL_SMALL_CERT_VERIFY.

This commit is contained in:
David Garske
2024-05-29 16:32:31 -07:00
parent 200f309e0e
commit 0b7f293691
2 changed files with 4 additions and 8 deletions

View File

@@ -23217,9 +23217,7 @@ static int CheckCertSignature_ex(const byte* cert, word32 certSz, void* heap,
#endif /* WOLFSSL_ASN_TEMPLATE */ #endif /* WOLFSSL_ASN_TEMPLATE */
} }
#ifdef OPENSSL_EXTRA /* Call CheckCertSignature_ex using a public key buffer for verification */
/* Call CheckCertSignature_ex using a public key buffer for verification
*/
int CheckCertSignaturePubKey(const byte* cert, word32 certSz, void* heap, int CheckCertSignaturePubKey(const byte* cert, word32 certSz, void* heap,
const byte* pubKey, word32 pubKeySz, int pubKeyOID) const byte* pubKey, word32 pubKeySz, int pubKeyOID)
{ {
@@ -23242,15 +23240,13 @@ int CheckCSRSignaturePubKey(const byte* cert, word32 certSz, void* heap,
pubKey, pubKeySz, pubKeyOID, 1); pubKey, pubKeySz, pubKeyOID, 1);
} }
#endif /* WOLFSSL_CERT_REQ */ #endif /* WOLFSSL_CERT_REQ */
#endif /* OPENSSL_EXTRA */
#ifdef WOLFSSL_SMALL_CERT_VERIFY
/* Call CheckCertSignature_ex using a certificate manager (cm) /* Call CheckCertSignature_ex using a certificate manager (cm)
*/ */
int CheckCertSignature(const byte* cert, word32 certSz, void* heap, void* cm) int CheckCertSignature(const byte* cert, word32 certSz, void* heap, void* cm)
{ {
return CheckCertSignature_ex(cert, certSz, heap, cm, NULL, 0, 0, 0); return CheckCertSignature_ex(cert, certSz, heap, cm, NULL, 0, 0, 0);
} }
#endif /* WOLFSSL_SMALL_CERT_VERIFY */
#endif /* WOLFSSL_SMALL_CERT_VERIFY || OPENSSL_EXTRA */ #endif /* WOLFSSL_SMALL_CERT_VERIFY || OPENSSL_EXTRA */
#if (defined(HAVE_ED25519) && defined(HAVE_ED25519_KEY_IMPORT) || \ #if (defined(HAVE_ED25519) && defined(HAVE_ED25519_KEY_IMPORT) || \

View File

@@ -2138,11 +2138,11 @@ WOLFSSL_LOCAL int EncodePolicyOID(byte *out, word32 *outSz,
WOLFSSL_API int CheckCertSignature(const byte*,word32,void*,void* cm); WOLFSSL_API int CheckCertSignature(const byte*,word32,void*,void* cm);
WOLFSSL_LOCAL int CheckCertSignaturePubKey(const byte* cert, word32 certSz, WOLFSSL_LOCAL int CheckCertSignaturePubKey(const byte* cert, word32 certSz,
void* heap, const byte* pubKey, word32 pubKeySz, int pubKeyOID); void* heap, const byte* pubKey, word32 pubKeySz, int pubKeyOID);
#ifdef OPENSSL_EXTRA #if defined(OPENSSL_EXTRA) || defined(WOLFSSL_SMALL_CERT_VERIFY)
WOLFSSL_API int wc_CheckCertSigPubKey(const byte* cert, word32 certSz, WOLFSSL_API int wc_CheckCertSigPubKey(const byte* cert, word32 certSz,
void* heap, const byte* pubKey, void* heap, const byte* pubKey,
word32 pubKeySz, int pubKeyOID); word32 pubKeySz, int pubKeyOID);
#endif #endif /* OPENSSL_EXTRA || WOLFSSL_SMALL_CERT_VERIFY */
#ifdef WOLFSSL_DUAL_ALG_CERTS #ifdef WOLFSSL_DUAL_ALG_CERTS
WOLFSSL_LOCAL int wc_ConfirmAltSignature( WOLFSSL_LOCAL int wc_ConfirmAltSignature(
const byte* buf, word32 bufSz, const byte* buf, word32 bufSz,