linuxkm/linuxkm_wc_port.h: move WOLFSSL_API_PREFIX_MAPping of GetCAByAKID to wolfSSL_GetCAByAKID from wolfssl/internal.h to wolfssl/wolfcrypt/asn.h, with an additional needed early mapping in linuxkm/linuxkm_wc_port.h.

This commit is contained in:
Daniel Pouzzner
2025-12-04 09:58:52 -06:00
parent 690cce67d1
commit e225bf80af
3 changed files with 20 additions and 5 deletions

View File

@@ -743,6 +743,9 @@
struct Signer* GetCAByKeyHash(void* vp, const unsigned char* keyHash);
#endif /* HAVE_OCSP */
#ifdef WOLFSSL_AKID_NAME
#ifdef WOLFSSL_API_PREFIX_MAP
#define GetCAByAKID wolfSSL_GetCAByAKID
#endif
struct Signer* GetCAByAKID(void* vp, const unsigned char* issuer,
unsigned int issuerSz,
const unsigned char* serial,
@@ -1286,7 +1289,11 @@
#endif /* HAVE_OCSP */
#endif /* NO_SKID */
#ifdef WOLFSSL_AKID_NAME
#define GetCAByAKID WC_PIE_INDIRECT_SYM(GetCAByAKID)
#ifdef WOLFSSL_API_PREFIX_MAP
#define wolfSSL_GetCAByAKID WC_PIE_INDIRECT_SYM(wolfSSL_GetCAByAKID)
#else
#define GetCAByAKID WC_PIE_INDIRECT_SYM(GetCAByAKID)
#endif
#endif
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)

View File

@@ -6698,10 +6698,11 @@ WOLFSSL_LOCAL WC_RNG* WOLFSSL_RSA_GetRNG(WOLFSSL_RSA *rsa, WC_RNG **tmpRNG,
#ifndef GetCA
WOLFSSL_LOCAL Signer* GetCA(void* vp, byte* hash);
#endif
#if defined(WOLFSSL_AKID_NAME) && !defined(GetCAByAKID)
#ifdef WOLFSSL_API_PREFIX_MAP
#define GetCAByAKID wolfSSL_GetCAByAKID
#endif
#if defined(WOLFSSL_AKID_NAME) && !defined(WC_SYM_RELOC_TABLES)
/* note WOLFSSL_API_PREFIX_MAPping is in asn.h, and if
* WC_SYM_RELOC_TABLES, the prototype is in the port layer
* (e.g. linuxkm_wc_port.h), to allow shimming.
*/
WOLFSSL_TEST_VIS Signer* GetCAByAKID(void* vp, const byte* issuer,
word32 issuerSz, const byte* serial, word32 serialSz);
#endif

View File

@@ -2084,6 +2084,13 @@ typedef enum MimeStatus
#define SetAlgoID wc_SetAlgoID
#define SetAsymKeyDer wc_SetAsymKeyDer
#define CalcHashId wc_CalcHashId
#if defined(WOLFSSL_AKID_NAME) && !defined(GetCAByAKID)
/* GetCAByAKID() has two implementations, a full implementation in
* src/ssl.c, and a dummy implementation in wolfcrypt/src/asn.c for
* WOLFCRYPT_ONLY builds.
*/
#define GetCAByAKID wolfSSL_GetCAByAKID
#endif
#endif /* WOLFSSL_API_PREFIX_MAP */
WOLFSSL_LOCAL int HashIdAlg(word32 oidSum);