@@ -190,7 +190,10 @@ ASN Options:
190190 #include <wolfssl/wolfcrypt/cryptocb.h>
191191#endif
192192
193- #include <wolfssl/internal.h>
193+ #ifndef WOLFCRYPT_ONLY
194+ #include <wolfssl/internal.h>
195+ #endif
196+
194197#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
195198 #include <wolfssl/openssl/objects.h>
196199#endif
@@ -18867,7 +18870,7 @@ static int DecodeAuthKeyId(const byte* input, word32 sz, DecodedCert* cert)
1886718870 /* Get the hash or hash of the hash if wrong size. */
1886818871 ret = GetHashId(dataASN[AUTHKEYIDASN_IDX_KEYID].data.ref.data,
1886918872 (int)dataASN[AUTHKEYIDASN_IDX_KEYID].data.ref.length,
18870- cert->extAuthKeyId, HashIdAlg(cert->signatureOID));
18873+ cert->extAuthKeyId, HashIdAlg((int) cert->signatureOID));
1887118874 }
1887218875#ifdef WOLFSSL_AKID_NAME
1887318876 if (ret == 0 && dataASN[AUTHKEYIDASN_IDX_ISSUER].data.ref.data != NULL) {
@@ -21448,29 +21451,10 @@ int wc_ParseCert(DecodedCert* cert, int type, int verify, void* cm)
2144821451 return ParseCert(cert, type, verify, cm);
2144921452}
2145021453
21451- #if !defined(OPENSSL_EXTRA) && !defined(OPENSSL_EXTRA_X509_SMALL) && \
21452- !defined(GetCA)
21453- /* from SSL proper, for locking can't do find here anymore.
21454- * brought in from internal.h if built with compat layer.
21455- * if defined(GetCA), it's a predefined macro and these prototypes
21456- * would conflict.
21457- */
21458- #ifdef __cplusplus
21459- extern "C" {
21460- #endif
21461- Signer* GetCA(void* signers, byte* hash);
21462- #ifndef NO_SKID
21463- Signer* GetCAByName(void* signers, byte* hash);
21464- #endif
21465- #ifdef __cplusplus
21466- }
21467- #endif
21468-
21469- #endif /* !OPENSSL_EXTRA && !OPENSSL_EXTRA_X509_SMALL && !GetCA */
21470-
21471- #if defined(WOLFCRYPT_ONLY)
21454+ #ifdef WOLFCRYPT_ONLY
2147221455
2147321456/* dummy functions, not using wolfSSL so don't need actual ones */
21457+ Signer* GetCA(void* signers, byte* hash);
2147421458Signer* GetCA(void* signers, byte* hash)
2147521459{
2147621460 (void)hash;
@@ -21479,6 +21463,7 @@ Signer* GetCA(void* signers, byte* hash)
2147921463}
2148021464
2148121465#ifndef NO_SKID
21466+ Signer* GetCAByName(void* signers, byte* hash);
2148221467Signer* GetCAByName(void* signers, byte* hash)
2148321468{
2148421469 (void)hash;
@@ -21488,6 +21473,8 @@ Signer* GetCAByName(void* signers, byte* hash)
2148821473#endif /* NO_SKID */
2148921474
2149021475#ifdef WOLFSSL_AKID_NAME
21476+ Signer* GetCAByAKID(void* vp, const byte* issuer, word32 issuerSz,
21477+ const byte* serial, word32 serialSz);
2149121478Signer* GetCAByAKID(void* vp, const byte* issuer, word32 issuerSz,
2149221479 const byte* serial, word32 serialSz)
2149321480{
@@ -22701,7 +22688,7 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
2270122688 }
2270222689 }
2270322690 else {
22704- cert->maxPathLen = min(cert->ca->maxPathLen - 1,
22691+ cert->maxPathLen = (byte) min(cert->ca->maxPathLen - 1,
2270522692 cert->maxPathLen);
2270622693 }
2270722694 }
0 commit comments