mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
account for cavp build
This commit is contained in:
committed by
Eric Blankenhorn
parent
76eec8884b
commit
b67ade5164
@ -16577,6 +16577,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
|
|||||||
#endif /* HAVE_AES_CBC */
|
#endif /* HAVE_AES_CBC */
|
||||||
|
|
||||||
#ifdef WOLFSSL_AES_CFB
|
#ifdef WOLFSSL_AES_CFB
|
||||||
|
#if !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
|
||||||
#ifdef WOLFSSL_AES_128
|
#ifdef WOLFSSL_AES_128
|
||||||
const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_128_cfb1(void)
|
const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_128_cfb1(void)
|
||||||
{
|
{
|
||||||
@ -16636,6 +16637,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
|
|||||||
return EVP_AES_256_CFB8;
|
return EVP_AES_256_CFB8;
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_AES_256 */
|
#endif /* WOLFSSL_AES_256 */
|
||||||
|
#endif /* !HAVE_SELFTEST && !HAVE_FIPS */
|
||||||
|
|
||||||
#ifdef WOLFSSL_AES_128
|
#ifdef WOLFSSL_AES_128
|
||||||
const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_128_cfb128(void)
|
const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_128_cfb128(void)
|
||||||
@ -18059,6 +18061,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
|
|||||||
#endif /* HAVE_AES_CBC */
|
#endif /* HAVE_AES_CBC */
|
||||||
|
|
||||||
#ifdef WOLFSSL_AES_CFB
|
#ifdef WOLFSSL_AES_CFB
|
||||||
|
#if !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
|
||||||
case AES_128_CFB1_TYPE:
|
case AES_128_CFB1_TYPE:
|
||||||
case AES_192_CFB1_TYPE:
|
case AES_192_CFB1_TYPE:
|
||||||
case AES_256_CFB1_TYPE:
|
case AES_256_CFB1_TYPE:
|
||||||
@ -18077,6 +18080,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
|
|||||||
else
|
else
|
||||||
ret = wc_AesCfb8Decrypt(&ctx->cipher.aes, dst, src, len);
|
ret = wc_AesCfb8Decrypt(&ctx->cipher.aes, dst, src, len);
|
||||||
break;
|
break;
|
||||||
|
#endif /* !HAVE_SELFTEST && !HAVE_FIPS */
|
||||||
case AES_128_CFB128_TYPE:
|
case AES_128_CFB128_TYPE:
|
||||||
case AES_192_CFB128_TYPE:
|
case AES_192_CFB128_TYPE:
|
||||||
case AES_256_CFB128_TYPE:
|
case AES_256_CFB128_TYPE:
|
||||||
|
@ -358,6 +358,7 @@ static int evpCipherBlock(WOLFSSL_EVP_CIPHER_CTX *ctx,
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if defined(WOLFSSL_AES_CFB)
|
#if defined(WOLFSSL_AES_CFB)
|
||||||
|
#if !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
|
||||||
case AES_128_CFB1_TYPE:
|
case AES_128_CFB1_TYPE:
|
||||||
case AES_192_CFB1_TYPE:
|
case AES_192_CFB1_TYPE:
|
||||||
case AES_256_CFB1_TYPE:
|
case AES_256_CFB1_TYPE:
|
||||||
@ -375,6 +376,7 @@ static int evpCipherBlock(WOLFSSL_EVP_CIPHER_CTX *ctx,
|
|||||||
else
|
else
|
||||||
ret = wc_AesCfb8Decrypt(&ctx->cipher.aes, out, in, inl);
|
ret = wc_AesCfb8Decrypt(&ctx->cipher.aes, out, in, inl);
|
||||||
break;
|
break;
|
||||||
|
#endif /* !HAVE_SELFTEST && !HAVE_FIPS */
|
||||||
|
|
||||||
case AES_128_CFB128_TYPE:
|
case AES_128_CFB128_TYPE:
|
||||||
case AES_192_CFB128_TYPE:
|
case AES_192_CFB128_TYPE:
|
||||||
|
@ -5606,7 +5606,7 @@ int des3_test(void)
|
|||||||
#ifndef NO_AES
|
#ifndef NO_AES
|
||||||
|
|
||||||
#if defined(WOLFSSL_AES_OFB) || defined(WOLFSSL_AES_CFB)
|
#if defined(WOLFSSL_AES_OFB) || defined(WOLFSSL_AES_CFB)
|
||||||
#ifdef OPENSSL_EXTRA
|
#if defined(OPENSSL_EXTRA) && !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
|
||||||
/* pass in the function, key, iv, plain text and expected and this function
|
/* pass in the function, key, iv, plain text and expected and this function
|
||||||
* tests that the encryption and decryption is successful */
|
* tests that the encryption and decryption is successful */
|
||||||
static int EVP_test(const WOLFSSL_EVP_CIPHER* type, const byte* key,
|
static int EVP_test(const WOLFSSL_EVP_CIPHER* type, const byte* key,
|
||||||
@ -6005,7 +6005,7 @@ EVP_TEST_END:
|
|||||||
}
|
}
|
||||||
#endif /* WOLFSSL_AES_OFB */
|
#endif /* WOLFSSL_AES_OFB */
|
||||||
|
|
||||||
#ifdef WOLFSSL_AES_CFB
|
#if defined(WOLFSSL_AES_CFB)
|
||||||
/* Test cases from NIST SP 800-38A, Recommendation for Block Cipher Modes of Operation Methods an*/
|
/* Test cases from NIST SP 800-38A, Recommendation for Block Cipher Modes of Operation Methods an*/
|
||||||
static int aescfb_test(void)
|
static int aescfb_test(void)
|
||||||
{
|
{
|
||||||
@ -6129,7 +6129,7 @@ EVP_TEST_END:
|
|||||||
|
|
||||||
#ifdef WOLFSSL_AES_128
|
#ifdef WOLFSSL_AES_128
|
||||||
/* 128 key tests */
|
/* 128 key tests */
|
||||||
#ifdef OPENSSL_EXTRA
|
#if defined(OPENSSL_EXTRA) && !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
|
||||||
ret = EVP_test(EVP_aes_128_cfb128(), key1, iv, msg1, sizeof(msg1),
|
ret = EVP_test(EVP_aes_128_cfb128(), key1, iv, msg1, sizeof(msg1),
|
||||||
cipher1, sizeof(cipher1));
|
cipher1, sizeof(cipher1));
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
@ -6177,7 +6177,7 @@ EVP_TEST_END:
|
|||||||
|
|
||||||
#ifdef WOLFSSL_AES_192
|
#ifdef WOLFSSL_AES_192
|
||||||
/* 192 key size test */
|
/* 192 key size test */
|
||||||
#ifdef OPENSSL_EXTRA
|
#if defined(OPENSSL_EXTRA) && !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
|
||||||
ret = EVP_test(EVP_aes_192_cfb128(), key2, iv, msg2, sizeof(msg2),
|
ret = EVP_test(EVP_aes_192_cfb128(), key2, iv, msg2, sizeof(msg2),
|
||||||
cipher2, sizeof(cipher2));
|
cipher2, sizeof(cipher2));
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
@ -6215,7 +6215,7 @@ EVP_TEST_END:
|
|||||||
|
|
||||||
#ifdef WOLFSSL_AES_256
|
#ifdef WOLFSSL_AES_256
|
||||||
/* 256 key size test */
|
/* 256 key size test */
|
||||||
#ifdef OPENSSL_EXTRA
|
#if defined(OPENSSL_EXTRA) && !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
|
||||||
ret = EVP_test(EVP_aes_256_cfb128(), key3, iv, msg3, sizeof(msg3),
|
ret = EVP_test(EVP_aes_256_cfb128(), key3, iv, msg3, sizeof(msg3),
|
||||||
cipher3, sizeof(cipher3));
|
cipher3, sizeof(cipher3));
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
@ -6288,7 +6288,7 @@ EVP_TEST_END:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
|
||||||
static int aescfb1_test(void)
|
static int aescfb1_test(void)
|
||||||
{
|
{
|
||||||
Aes enc;
|
Aes enc;
|
||||||
@ -6585,6 +6585,7 @@ EVP_TEST_END:
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif /* !HAVE_SELFTEST && !HAVE_FIPS */
|
||||||
#endif /* WOLFSSL_AES_CFB */
|
#endif /* WOLFSSL_AES_CFB */
|
||||||
|
|
||||||
|
|
||||||
@ -7798,7 +7799,7 @@ int aes_test(void)
|
|||||||
ret = aescfb_test();
|
ret = aescfb_test();
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
#if !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
|
||||||
ret = aescfb1_test();
|
ret = aescfb1_test();
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
@ -7807,6 +7808,7 @@ int aes_test(void)
|
|||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(HAVE_AES_CBC) || defined(WOLFSSL_AES_COUNTER)
|
#if defined(HAVE_AES_CBC) || defined(WOLFSSL_AES_COUNTER)
|
||||||
|
Reference in New Issue
Block a user