forked from wolfSSL/wolfssl
Merge pull request #5248 from lealem47/no_aes
Fix build failure caused by missing NO_AES macro guard
This commit is contained in:
@ -52718,7 +52718,9 @@ static void test_wolfSSL_PEM_write_RSAPrivateKey(void)
|
|||||||
size_t privDerSz = sizeof_client_key_der_2048;
|
size_t privDerSz = sizeof_client_key_der_2048;
|
||||||
#endif
|
#endif
|
||||||
const unsigned char* der;
|
const unsigned char* der;
|
||||||
|
#ifndef NO_AES
|
||||||
unsigned char passwd[] = "password";
|
unsigned char passwd[] = "password";
|
||||||
|
#endif
|
||||||
|
|
||||||
printf(testingFmt, "wolfSSL_PEM_write_RSAPrivateKey");
|
printf(testingFmt, "wolfSSL_PEM_write_RSAPrivateKey");
|
||||||
|
|
||||||
@ -52738,11 +52740,12 @@ static void test_wolfSSL_PEM_write_RSAPrivateKey(void)
|
|||||||
|
|
||||||
AssertIntEQ(wolfSSL_PEM_write_RSAPrivateKey(stdout, rsa, NULL, NULL, 0,
|
AssertIntEQ(wolfSSL_PEM_write_RSAPrivateKey(stdout, rsa, NULL, NULL, 0,
|
||||||
NULL, NULL), 1);
|
NULL, NULL), 1);
|
||||||
|
#ifndef NO_AES
|
||||||
AssertIntEQ(wolfSSL_PEM_write_RSAPrivateKey(stdout, rsa, EVP_aes_128_cbc(),
|
AssertIntEQ(wolfSSL_PEM_write_RSAPrivateKey(stdout, rsa, EVP_aes_128_cbc(),
|
||||||
NULL, 0, NULL, NULL), 1);
|
NULL, 0, NULL, NULL), 1);
|
||||||
AssertIntEQ(wolfSSL_PEM_write_RSAPrivateKey(stdout, rsa, EVP_aes_128_cbc(),
|
AssertIntEQ(wolfSSL_PEM_write_RSAPrivateKey(stdout, rsa, EVP_aes_128_cbc(),
|
||||||
passwd, sizeof(passwd) - 1, NULL, NULL), 1);
|
passwd, sizeof(passwd) - 1, NULL, NULL), 1);
|
||||||
|
#endif
|
||||||
RSA_free(rsa);
|
RSA_free(rsa);
|
||||||
|
|
||||||
printf(resultFmt, passed);
|
printf(resultFmt, passed);
|
||||||
@ -52763,7 +52766,9 @@ static void test_wolfSSL_PEM_write_mem_RSAPrivateKey(void)
|
|||||||
size_t privDerSz = sizeof_client_key_der_2048;
|
size_t privDerSz = sizeof_client_key_der_2048;
|
||||||
#endif
|
#endif
|
||||||
const unsigned char* der;
|
const unsigned char* der;
|
||||||
|
#ifndef NO_AES
|
||||||
unsigned char passwd[] = "password";
|
unsigned char passwd[] = "password";
|
||||||
|
#endif
|
||||||
unsigned char* pem;
|
unsigned char* pem;
|
||||||
int plen;
|
int plen;
|
||||||
|
|
||||||
@ -52788,12 +52793,14 @@ static void test_wolfSSL_PEM_write_mem_RSAPrivateKey(void)
|
|||||||
AssertIntEQ(wolfSSL_PEM_write_mem_RSAPrivateKey(rsa, NULL, NULL, 0, &pem,
|
AssertIntEQ(wolfSSL_PEM_write_mem_RSAPrivateKey(rsa, NULL, NULL, 0, &pem,
|
||||||
&plen), 1);
|
&plen), 1);
|
||||||
XFREE(pem, NULL, DYNAMIC_TYPE_KEY);
|
XFREE(pem, NULL, DYNAMIC_TYPE_KEY);
|
||||||
|
#ifndef NO_AES
|
||||||
AssertIntEQ(wolfSSL_PEM_write_mem_RSAPrivateKey(rsa, EVP_aes_128_cbc(),
|
AssertIntEQ(wolfSSL_PEM_write_mem_RSAPrivateKey(rsa, EVP_aes_128_cbc(),
|
||||||
NULL, 0, &pem, &plen), 1);
|
NULL, 0, &pem, &plen), 1);
|
||||||
XFREE(pem, NULL, DYNAMIC_TYPE_KEY);
|
XFREE(pem, NULL, DYNAMIC_TYPE_KEY);
|
||||||
AssertIntEQ(wolfSSL_PEM_write_mem_RSAPrivateKey(rsa, EVP_aes_128_cbc(),
|
AssertIntEQ(wolfSSL_PEM_write_mem_RSAPrivateKey(rsa, EVP_aes_128_cbc(),
|
||||||
passwd, sizeof(passwd) - 1, &pem, &plen), 1);
|
passwd, sizeof(passwd) - 1, &pem, &plen), 1);
|
||||||
XFREE(pem, NULL, DYNAMIC_TYPE_KEY);
|
XFREE(pem, NULL, DYNAMIC_TYPE_KEY);
|
||||||
|
#endif
|
||||||
|
|
||||||
RSA_free(rsa);
|
RSA_free(rsa);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user