mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Merge pull request #7977 from billphipps/have_rsa_fix
Update to remove HAVE_RSA references. Correct NO_MALLOC RSA test bug.
This commit is contained in:
@ -50,7 +50,6 @@
|
|||||||
#define HAVE_CHACHA
|
#define HAVE_CHACHA
|
||||||
#define HAVE_POLY1305
|
#define HAVE_POLY1305
|
||||||
#define HAVE_ECC
|
#define HAVE_ECC
|
||||||
#define HAVE_RSA
|
|
||||||
#define HAVE_SHA256
|
#define HAVE_SHA256
|
||||||
#define HAVE_SUPPORTED_CURVES
|
#define HAVE_SUPPORTED_CURVES
|
||||||
#define HAVE_TLS_EXTENSIONS
|
#define HAVE_TLS_EXTENSIONS
|
||||||
|
@ -57,7 +57,6 @@
|
|||||||
#define WOLFSSL_SHAKE256
|
#define WOLFSSL_SHAKE256
|
||||||
|
|
||||||
/* RSA */
|
/* RSA */
|
||||||
#define HAVE_RSA
|
|
||||||
#define WOLFSSL_HAVE_SP_RSA
|
#define WOLFSSL_HAVE_SP_RSA
|
||||||
#define WC_RSA_BLINDING
|
#define WC_RSA_BLINDING
|
||||||
#define WOLFSSL_KEY_GEN
|
#define WOLFSSL_KEY_GEN
|
||||||
|
@ -47390,7 +47390,7 @@ static int test_wc_SetSubjectKeyIdFromPublicKey_ex(void)
|
|||||||
#if defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_CERT_GEN)
|
#if defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_CERT_GEN)
|
||||||
WC_RNG rng;
|
WC_RNG rng;
|
||||||
Cert cert;
|
Cert cert;
|
||||||
#if !defined(NO_RSA) && defined(HAVE_RSA)
|
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
|
||||||
RsaKey rsaKey;
|
RsaKey rsaKey;
|
||||||
int bits = 2048;
|
int bits = 2048;
|
||||||
#endif
|
#endif
|
||||||
@ -47413,7 +47413,7 @@ static int test_wc_SetSubjectKeyIdFromPublicKey_ex(void)
|
|||||||
|
|
||||||
ExpectIntEQ(wc_InitCert(&cert), 0);
|
ExpectIntEQ(wc_InitCert(&cert), 0);
|
||||||
|
|
||||||
#if !defined(NO_RSA) && defined(HAVE_RSA) && defined(WOLFSSL_KEY_GEN)
|
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
|
||||||
/* RSA */
|
/* RSA */
|
||||||
XMEMSET(&rsaKey, 0, sizeof(RsaKey));
|
XMEMSET(&rsaKey, 0, sizeof(RsaKey));
|
||||||
ExpectIntEQ(wc_InitRsaKey(&rsaKey, HEAP_HINT), 0);
|
ExpectIntEQ(wc_InitRsaKey(&rsaKey, HEAP_HINT), 0);
|
||||||
@ -47472,7 +47472,7 @@ static int test_wc_SetAuthKeyIdFromPublicKey_ex(void)
|
|||||||
#if defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_CERT_GEN)
|
#if defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_CERT_GEN)
|
||||||
WC_RNG rng;
|
WC_RNG rng;
|
||||||
Cert cert;
|
Cert cert;
|
||||||
#if !defined(NO_RSA) && defined(HAVE_RSA)
|
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
|
||||||
RsaKey rsaKey;
|
RsaKey rsaKey;
|
||||||
int bits = 2048;
|
int bits = 2048;
|
||||||
#endif
|
#endif
|
||||||
@ -47495,7 +47495,7 @@ static int test_wc_SetAuthKeyIdFromPublicKey_ex(void)
|
|||||||
|
|
||||||
ExpectIntEQ(wc_InitCert(&cert), 0);
|
ExpectIntEQ(wc_InitCert(&cert), 0);
|
||||||
|
|
||||||
#if !defined(NO_RSA) && defined(HAVE_RSA) && defined(WOLFSSL_KEY_GEN)
|
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
|
||||||
/* RSA */
|
/* RSA */
|
||||||
XMEMSET(&rsaKey, 0, sizeof(RsaKey));
|
XMEMSET(&rsaKey, 0, sizeof(RsaKey));
|
||||||
ExpectIntEQ(wc_InitRsaKey(&rsaKey, HEAP_HINT), 0);
|
ExpectIntEQ(wc_InitRsaKey(&rsaKey, HEAP_HINT), 0);
|
||||||
|
@ -1346,7 +1346,7 @@ int SuiteTest(int argc, char** argv)
|
|||||||
args.return_code = EXIT_FAILURE;
|
args.return_code = EXIT_FAILURE;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_RSA and HAVE_ECC */
|
#endif /* !NO__RSA and HAVE_ECC */
|
||||||
#endif /* !WC_STRICT_SIG */
|
#endif /* !WC_STRICT_SIG */
|
||||||
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3) && \
|
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3) && \
|
||||||
(defined(WOLFSSL_SM4_GCM) || defined(WOLFSSL_SM4_CCM))
|
(defined(WOLFSSL_SM4_GCM) || defined(WOLFSSL_SM4_CCM))
|
||||||
|
@ -20994,7 +20994,7 @@ static wc_test_ret_t rsa_keygen_test(WC_RNG* rng)
|
|||||||
#ifndef WOLFSSL_NO_MALLOC
|
#ifndef WOLFSSL_NO_MALLOC
|
||||||
byte* der = NULL;
|
byte* der = NULL;
|
||||||
#else
|
#else
|
||||||
byte der[1024];
|
byte der[1280];
|
||||||
#endif
|
#endif
|
||||||
#ifndef WOLFSSL_CRYPTOCELL
|
#ifndef WOLFSSL_CRYPTOCELL
|
||||||
word32 idx = 0;
|
word32 idx = 0;
|
||||||
@ -21046,8 +21046,11 @@ static wc_test_ret_t rsa_keygen_test(WC_RNG* rng)
|
|||||||
if (der == NULL) {
|
if (der == NULL) {
|
||||||
ERROR_OUT(WC_TEST_RET_ENC_ERRNO, exit_rsa);
|
ERROR_OUT(WC_TEST_RET_ENC_ERRNO, exit_rsa);
|
||||||
}
|
}
|
||||||
|
derSz = FOURK_BUF;
|
||||||
|
#else
|
||||||
|
derSz = sizeof(der);
|
||||||
#endif
|
#endif
|
||||||
derSz = wc_RsaKeyToDer(genKey, der, FOURK_BUF);
|
derSz = wc_RsaKeyToDer(genKey, der, derSz);
|
||||||
if (derSz < 0) {
|
if (derSz < 0) {
|
||||||
ERROR_OUT(WC_TEST_RET_ENC_EC(derSz), exit_rsa);
|
ERROR_OUT(WC_TEST_RET_ENC_EC(derSz), exit_rsa);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user