mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
PKCS7/CMS build fixes when disabling RSA, ECC, or AES-GCM/CCM
This commit is contained in:
committed by
David Garske
parent
867bcb4545
commit
004b0d3793
@ -8168,10 +8168,13 @@ static int wc_PKCS7_DecryptKari(PKCS7* pkcs7, byte* in, word32 inSz,
|
||||
|
||||
}
|
||||
return ret;
|
||||
#else
|
||||
(void)pkcs7;
|
||||
|
||||
(void)pkiMsg;
|
||||
(void)pkiMsgSz;
|
||||
#else
|
||||
(void)in;
|
||||
(void)inSz;
|
||||
(void)pkcs7;
|
||||
(void)idx;
|
||||
(void)decryptedKey;
|
||||
(void)decryptedKeySz;
|
||||
@ -8206,8 +8209,12 @@ static int wc_PKCS7_DecryptRecipientInfos(PKCS7* pkcs7, byte* in,
|
||||
case WC_PKCS7_DECRYPT_KTRI:
|
||||
case WC_PKCS7_DECRYPT_KTRI_2:
|
||||
case WC_PKCS7_DECRYPT_KTRI_3:
|
||||
#ifndef NO_RSA
|
||||
ret = wc_PKCS7_DecryptKtri(pkcs7, in, inSz, idx,
|
||||
decryptedKey, decryptedKeySz, recipFound);
|
||||
#else
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case WC_PKCS7_DECRYPT_KARI:
|
||||
|
@ -329,7 +329,9 @@ int scrypt_test(void);
|
||||
#endif
|
||||
int pkcs7signed_test(void);
|
||||
int pkcs7enveloped_test(void);
|
||||
#if defined(HAVE_AESGCM) || defined(HAVE_AESCCM)
|
||||
int pkcs7authenveloped_test(void);
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(NO_ASN_TIME) && !defined(NO_RSA) && defined(WOLFSSL_TEST_CERT)
|
||||
int cert_test(void);
|
||||
@ -974,10 +976,12 @@ initDefaultName();
|
||||
else
|
||||
printf( "PKCS7enveloped test passed!\n");
|
||||
|
||||
#if defined(HAVE_AESGCM) || defined(HAVE_AESCCM)
|
||||
if ( (ret = pkcs7authenveloped_test()) != 0)
|
||||
return err_sys("PKCS7authenveloped test failed!\n", ret);
|
||||
else
|
||||
printf( "PKCS7authenveloped test passed!\n");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
@ -19538,6 +19542,8 @@ int pkcs7enveloped_test(void)
|
||||
}
|
||||
|
||||
|
||||
#if defined(HAVE_AESGCM) || defined(HAVE_AESCCM)
|
||||
|
||||
typedef struct {
|
||||
const byte* content;
|
||||
word32 contentSz;
|
||||
@ -20168,6 +20174,8 @@ int pkcs7authenveloped_test(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* HAVE_AESGCM || HAVE_AESCCM */
|
||||
|
||||
|
||||
#ifndef NO_PKCS7_ENCRYPTED_DATA
|
||||
|
||||
@ -21011,13 +21019,6 @@ static int pkcs7signed_run_vectors(
|
||||
if (ret > 0)
|
||||
return 0;
|
||||
|
||||
#ifndef HAVE_ECC
|
||||
(void)eccCert;
|
||||
(void)eccCertSz;
|
||||
(void)eccPrivKey;
|
||||
(void)eccPrivKeySz;
|
||||
#endif
|
||||
#ifdef NO_RSA
|
||||
(void)rsaClientCertBuf;
|
||||
(void)rsaClientCertBufSz;
|
||||
(void)rsaClientPrivKeyBuf;
|
||||
@ -21030,16 +21031,11 @@ static int pkcs7signed_run_vectors(
|
||||
(void)rsaCaCertBufSz;
|
||||
(void)rsaCaPrivKeyBuf;
|
||||
(void)rsaCaPrivKeyBufSz;
|
||||
#endif
|
||||
(void)eccClientCertBuf;
|
||||
(void)eccClientCertBufSz;
|
||||
(void)eccClientPrivKeyBuf;
|
||||
(void)eccClientPrivKeyBufSz;
|
||||
|
||||
(void)rsaServerCertBuf;
|
||||
(void)rsaServerCertBufSz;
|
||||
(void)rsaServerPrivKeyBuf;
|
||||
(void)rsaServerPrivKeyBufSz;
|
||||
(void)rsaCaCertBuf;
|
||||
(void)rsaCaCertBufSz;
|
||||
(void)rsaCaPrivKeyBuf;
|
||||
(void)rsaCaPrivKeyBufSz;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -21570,13 +21566,11 @@ static int pkcs7signed_run_SingleShotVectors(
|
||||
if (ret > 0)
|
||||
return 0;
|
||||
|
||||
#ifndef HAVE_ECC
|
||||
(void)eccCert;
|
||||
(void)eccCertSz;
|
||||
(void)eccPrivKey;
|
||||
(void)eccPrivKeySz;
|
||||
#endif
|
||||
#ifdef NO_RSA
|
||||
(void)eccClientCertBuf;
|
||||
(void)eccClientCertBufSz;
|
||||
(void)eccClientPrivKeyBuf;
|
||||
(void)eccClientPrivKeyBufSz;
|
||||
|
||||
(void)rsaClientCertBuf;
|
||||
(void)rsaClientCertBufSz;
|
||||
(void)rsaClientPrivKeyBuf;
|
||||
@ -21589,16 +21583,7 @@ static int pkcs7signed_run_SingleShotVectors(
|
||||
(void)rsaCaCertBufSz;
|
||||
(void)rsaCaPrivKeyBuf;
|
||||
(void)rsaCaPrivKeyBufSz;
|
||||
#endif
|
||||
|
||||
(void)rsaServerCertBuf;
|
||||
(void)rsaServerCertBufSz;
|
||||
(void)rsaServerPrivKeyBuf;
|
||||
(void)rsaServerPrivKeyBufSz;
|
||||
(void)rsaCaCertBuf;
|
||||
(void)rsaCaCertBufSz;
|
||||
(void)rsaCaPrivKeyBuf;
|
||||
(void)rsaCaPrivKeyBufSz;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user