Skip to content

Commit 0b7f293

Browse files
committed
Expose wc_CheckCertSigPubKey with WOLFSSL_SMALL_CERT_VERIFY.
1 parent 200f309 commit 0b7f293

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23217,9 +23217,7 @@ static int CheckCertSignature_ex(const byte* cert, word32 certSz, void* heap,
2321723217
#endif /* WOLFSSL_ASN_TEMPLATE */
2321823218
}
2321923219

23220-
#ifdef OPENSSL_EXTRA
23221-
/* Call CheckCertSignature_ex using a public key buffer for verification
23222-
*/
23220+
/* Call CheckCertSignature_ex using a public key buffer for verification */
2322323221
int CheckCertSignaturePubKey(const byte* cert, word32 certSz, void* heap,
2322423222
const byte* pubKey, word32 pubKeySz, int pubKeyOID)
2322523223
{
@@ -23242,15 +23240,13 @@ int CheckCSRSignaturePubKey(const byte* cert, word32 certSz, void* heap,
2324223240
pubKey, pubKeySz, pubKeyOID, 1);
2324323241
}
2324423242
#endif /* WOLFSSL_CERT_REQ */
23245-
#endif /* OPENSSL_EXTRA */
23246-
#ifdef WOLFSSL_SMALL_CERT_VERIFY
23243+
2324723244
/* Call CheckCertSignature_ex using a certificate manager (cm)
2324823245
*/
2324923246
int CheckCertSignature(const byte* cert, word32 certSz, void* heap, void* cm)
2325023247
{
2325123248
return CheckCertSignature_ex(cert, certSz, heap, cm, NULL, 0, 0, 0);
2325223249
}
23253-
#endif /* WOLFSSL_SMALL_CERT_VERIFY */
2325423250
#endif /* WOLFSSL_SMALL_CERT_VERIFY || OPENSSL_EXTRA */
2325523251

2325623252
#if (defined(HAVE_ED25519) && defined(HAVE_ED25519_KEY_IMPORT) || \

wolfssl/wolfcrypt/asn.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,11 +2138,11 @@ WOLFSSL_LOCAL int EncodePolicyOID(byte *out, word32 *outSz,
21382138
WOLFSSL_API int CheckCertSignature(const byte*,word32,void*,void* cm);
21392139
WOLFSSL_LOCAL int CheckCertSignaturePubKey(const byte* cert, word32 certSz,
21402140
void* heap, const byte* pubKey, word32 pubKeySz, int pubKeyOID);
2141-
#ifdef OPENSSL_EXTRA
2141+
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_SMALL_CERT_VERIFY)
21422142
WOLFSSL_API int wc_CheckCertSigPubKey(const byte* cert, word32 certSz,
21432143
void* heap, const byte* pubKey,
21442144
word32 pubKeySz, int pubKeyOID);
2145-
#endif
2145+
#endif /* OPENSSL_EXTRA || WOLFSSL_SMALL_CERT_VERIFY */
21462146
#ifdef WOLFSSL_DUAL_ALG_CERTS
21472147
WOLFSSL_LOCAL int wc_ConfirmAltSignature(
21482148
const byte* buf, word32 bufSz,

0 commit comments

Comments
 (0)