From ec6ffb05838b6d0aa83958a37799afa6f30bb18b Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Mon, 26 Jul 2021 16:34:20 +1000 Subject: [PATCH] Configuration: fixes for uncommon configurations ./configure --enable-all --disable-filesystem ./configure --enable-all CC=g++ --enable-intelasm --- src/ssl.c | 4 ++-- wolfcrypt/src/aes.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 9cf5b47d0..735085076 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -31902,7 +31902,7 @@ int wolfSSL_DSA_do_verify_ex(const unsigned char* digest, int digest_len, } } - key = dsa->internal; + key = (DsaKey*)dsa->internal; if (key == NULL) { WOLFSSL_MSG("dsa->internal is null"); @@ -56993,7 +56993,7 @@ WOLF_STACK_OF(WOLFSSL_X509_OBJECT)* wolfSSL_X509_STORE_get0_objects( goto err_cleanup; } -#ifdef WOLFSSL_SIGNER_DER_CERT +#if defined(WOLFSSL_SIGNER_DER_CERT) && !defined(NO_FILESYSTEM) cert_stack = wolfSSL_CertManagerGetCerts(store->cm); /* wolfSSL_sk_X509_pop checks for NULL */ while ((x509 = wolfSSL_sk_X509_pop(cert_stack)) != NULL) { diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c index 1b2be4a6d..0b69fbc81 100644 --- a/wolfcrypt/src/aes.c +++ b/wolfcrypt/src/aes.c @@ -8048,6 +8048,11 @@ static void AesGcmFinal_C(Aes* aes, byte* authTag, word32 authTagSz) } #ifdef WOLFSSL_AESNI + +#ifdef __cplusplus + extern "C" { +#endif + /* Assembly code implementations in: aes_gcm_asm.S */ #ifdef HAVE_INTEL_AVX2 extern void AES_GCM_init_avx2(const unsigned char* key, int nr, @@ -8102,6 +8107,10 @@ extern void AES_GCM_encrypt_final_aesni(unsigned char* tag, unsigned char* authTag, unsigned int tbytes, unsigned int nbytes, unsigned int abytes, unsigned char* h, unsigned char* initCtr); +#ifdef __cplusplus + } /* extern "C" */ +#endif + /* Initialize the AES GCM cipher with an IV. AES-NI implementations. * * @param [in, out] aes AES object. @@ -8450,6 +8459,11 @@ static void AesGcmEncryptFinal_aesni(Aes* aes, byte* authTag, word32 authTagSz) } #if defined(HAVE_AES_DECRYPT) || defined(HAVE_AESGCM_DECRYPT) + +#ifdef __cplusplus + extern "C" { +#endif + /* Assembly code implementations in: aes_gcm_asm.S */ #ifdef HAVE_INTEL_AVX2 extern void AES_GCM_decrypt_update_avx2(const unsigned char* key, int nr, @@ -8474,6 +8488,10 @@ extern void AES_GCM_decrypt_final_aesni(unsigned char* tag, const unsigned char* authTag, unsigned int tbytes, unsigned int nbytes, unsigned int abytes, unsigned char* h, unsigned char* initCtr, int* res); +#ifdef __cplusplus + } /* extern "C" */ +#endif + /* Update the AES GCM for decryption with data and/or authentication data. * * @param [in, out] aes AES object.