mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-10 04:40:49 +02:00
additional macro guards for disabling aescbc with opensslextra
This commit is contained in:
@@ -21184,7 +21184,7 @@ void wolfSSL_AES_ecb_encrypt(const unsigned char *in, unsigned char* out,
|
||||
}
|
||||
#endif /* HAVE_AES_ECB */
|
||||
|
||||
|
||||
#if defined(HAVE_AES_CBC)
|
||||
/* Encrypt data using key and iv passed in. iv gets updated to most recent iv
|
||||
* state after encryptiond/decryption.
|
||||
*
|
||||
@@ -21227,6 +21227,7 @@ void wolfSSL_AES_cbc_encrypt(const unsigned char *in, unsigned char* out,
|
||||
/* to be compatible copy iv to iv buffer after completing operation */
|
||||
XMEMCPY(iv, (byte*)(aes->reg), AES_BLOCK_SIZE);
|
||||
}
|
||||
#endif /* HAVE_AES_CBC */
|
||||
|
||||
|
||||
/* Encrypt data using CFB mode with key and iv passed in. iv gets updated to
|
||||
@@ -25890,6 +25891,7 @@ int wolfSSL_EVP_CIPHER_iv_length(const WOLFSSL_EVP_CIPHER* cipher)
|
||||
WOLFSSL_MSG("wolfSSL_EVP_CIPHER_iv_length");
|
||||
|
||||
#ifndef NO_AES
|
||||
#ifdef HAVE_AES_CBC
|
||||
#ifdef WOLFSSL_AES_128
|
||||
if (XSTRNCMP(name, EVP_AES_128_CBC, XSTRLEN(EVP_AES_128_CBC)) == 0)
|
||||
return AES_BLOCK_SIZE;
|
||||
@@ -25902,6 +25904,7 @@ int wolfSSL_EVP_CIPHER_iv_length(const WOLFSSL_EVP_CIPHER* cipher)
|
||||
if (XSTRNCMP(name, EVP_AES_256_CBC, XSTRLEN(EVP_AES_256_CBC)) == 0)
|
||||
return AES_BLOCK_SIZE;
|
||||
#endif
|
||||
#endif /* HAVE_AES_CBC */
|
||||
#ifdef WOLFSSL_AES_COUNTER
|
||||
#ifdef WOLFSSL_AES_128
|
||||
if (XSTRNCMP(name, EVP_AES_128_CTR, XSTRLEN(EVP_AES_128_CTR)) == 0)
|
||||
|
||||
+2
-2
@@ -16910,7 +16910,7 @@ static void test_wolfSSL_PEM_PrivateKey(void)
|
||||
#ifndef WOLFSSL_NO_TLS12
|
||||
AssertNotNull(ctx = SSL_CTX_new(TLSv1_2_server_method()));
|
||||
#else
|
||||
AssertNotNull(ctx = SSL_CTX_new(TLSv1_3_server_method()));
|
||||
AssertNotNull(ctx = SSL_CTX_new(wolfTLSv1_3_server_method()));
|
||||
#endif
|
||||
|
||||
AssertNotNull(bio = BIO_new_file("./certs/server-keyEnc.pem", "rb"));
|
||||
@@ -16953,7 +16953,7 @@ static void test_wolfSSL_PEM_PrivateKey(void)
|
||||
#ifndef WOLFSSL_NO_TLS12
|
||||
AssertNotNull(ctx = SSL_CTX_new(TLSv1_2_server_method()));
|
||||
#else
|
||||
AssertNotNull(ctx = SSL_CTX_new(TLSv1_3_server_method()));
|
||||
AssertNotNull(ctx = SSL_CTX_new(wolfTLSv1_3_server_method()));
|
||||
#endif
|
||||
|
||||
f = XFOPEN("./certs/ecc-key.der", "rb");
|
||||
|
||||
@@ -343,7 +343,7 @@ int wc_BufferKeyEncrypt(EncryptedInfo* info, byte* der, word32 derSz,
|
||||
if (info->cipherType == WC_CIPHER_DES3)
|
||||
ret = wc_Des3_CbcEncryptWithKey(der, der, derSz, key, info->iv);
|
||||
#endif /* NO_DES3 */
|
||||
#ifndef NO_AES
|
||||
#if !defined(NO_AES) && defined(HAVE_AES_CBC)
|
||||
if (info->cipherType == WC_CIPHER_AES_CBC)
|
||||
ret = wc_AesCbcEncryptWithKey(der, der, derSz, key, info->keySz,
|
||||
info->iv);
|
||||
@@ -564,7 +564,7 @@ int wc_CryptKey(const char* password, int passwordSz, byte* salt,
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifndef NO_AES
|
||||
#if !defined(NO_AES) && defined(HAVE_AES_CBC)
|
||||
#ifdef WOLFSSL_AES_256
|
||||
case PBE_AES256_CBC:
|
||||
{
|
||||
|
||||
@@ -13043,7 +13043,7 @@ int openssl_test(void)
|
||||
if (openssl_aes_test() != 0)
|
||||
return -7412;
|
||||
|
||||
#ifdef WOLFSSL_AES_128
|
||||
#if defined(WOLFSSL_AES_128) && defined(HAVE_AES_CBC)
|
||||
{ /* evp_cipher test: EVP_aes_128_cbc */
|
||||
EVP_CIPHER_CTX ctx;
|
||||
int idx, cipherSz, plainSz;
|
||||
@@ -13480,7 +13480,7 @@ int openssl_test(void)
|
||||
}
|
||||
#endif /* HAVE_AES_COUNTER */
|
||||
|
||||
#ifdef WOLFSSL_AES_128
|
||||
#if defined(HAVE_AES_CBC) && defined(WOLFSSL_AES_128)
|
||||
{
|
||||
/* EVP_CipherUpdate test */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user