Skip to content

Commit 92f3a80

Browse files
committed
Update to remove HAVE_RSA references. Correct NO_MALLOC RSA test bug.
1 parent 2323140 commit 92f3a80

5 files changed

Lines changed: 10 additions & 9 deletions

File tree

IDE/Renesas/e2studio/RA6M3/common/user_settings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
#define HAVE_CHACHA
5151
#define HAVE_POLY1305
5252
#define HAVE_ECC
53-
#define HAVE_RSA
5453
#define HAVE_SHA256
5554
#define HAVE_SUPPORTED_CURVES
5655
#define HAVE_TLS_EXTENSIONS

examples/configs/user_settings_wolfboot_keytools.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
#define WOLFSSL_SHAKE256
5858

5959
/* RSA */
60-
#define HAVE_RSA
6160
#define WOLFSSL_HAVE_SP_RSA
6261
#define WC_RSA_BLINDING
6362
#define WOLFSSL_KEY_GEN

tests/api.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42805,7 +42805,7 @@ static int test_wc_SetSubjectKeyIdFromPublicKey_ex(void)
4280542805
#if defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_CERT_GEN)
4280642806
WC_RNG rng;
4280742807
Cert cert;
42808-
#if !defined(NO_RSA) && defined(HAVE_RSA)
42808+
#if !defined(NO_RSA)
4280942809
RsaKey rsaKey;
4281042810
int bits = 2048;
4281142811
#endif
@@ -42828,7 +42828,7 @@ static int test_wc_SetSubjectKeyIdFromPublicKey_ex(void)
4282842828

4282942829
ExpectIntEQ(wc_InitCert(&cert), 0);
4283042830

42831-
#if !defined(NO_RSA) && defined(HAVE_RSA) && defined(WOLFSSL_KEY_GEN)
42831+
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
4283242832
/* RSA */
4283342833
XMEMSET(&rsaKey, 0, sizeof(RsaKey));
4283442834
ExpectIntEQ(wc_InitRsaKey(&rsaKey, HEAP_HINT), 0);
@@ -42887,7 +42887,7 @@ static int test_wc_SetAuthKeyIdFromPublicKey_ex(void)
4288742887
#if defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_CERT_GEN)
4288842888
WC_RNG rng;
4288942889
Cert cert;
42890-
#if !defined(NO_RSA) && defined(HAVE_RSA)
42890+
#if !defined(NO_RSA)
4289142891
RsaKey rsaKey;
4289242892
int bits = 2048;
4289342893
#endif
@@ -42910,7 +42910,7 @@ static int test_wc_SetAuthKeyIdFromPublicKey_ex(void)
4291042910

4291142911
ExpectIntEQ(wc_InitCert(&cert), 0);
4291242912

42913-
#if !defined(NO_RSA) && defined(HAVE_RSA) && defined(WOLFSSL_KEY_GEN)
42913+
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
4291442914
/* RSA */
4291542915
XMEMSET(&rsaKey, 0, sizeof(RsaKey));
4291642916
ExpectIntEQ(wc_InitRsaKey(&rsaKey, HEAP_HINT), 0);

tests/suites.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ int SuiteTest(int argc, char** argv)
13461346
args.return_code = EXIT_FAILURE;
13471347
goto exit;
13481348
}
1349-
#endif /* HAVE_RSA and HAVE_ECC */
1349+
#endif /* !NO__RSA and HAVE_ECC */
13501350
#endif /* !WC_STRICT_SIG */
13511351
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3) && \
13521352
(defined(WOLFSSL_SM4_GCM) || defined(WOLFSSL_SM4_CCM))

wolfcrypt/test/test.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20875,7 +20875,7 @@ static wc_test_ret_t rsa_keygen_test(WC_RNG* rng)
2087520875
#ifndef WOLFSSL_NO_MALLOC
2087620876
byte* der = NULL;
2087720877
#else
20878-
byte der[1024];
20878+
byte der[1280];
2087920879
#endif
2088020880
#ifndef WOLFSSL_CRYPTOCELL
2088120881
word32 idx = 0;
@@ -20926,8 +20926,11 @@ static wc_test_ret_t rsa_keygen_test(WC_RNG* rng)
2092620926
if (der == NULL) {
2092720927
ERROR_OUT(WC_TEST_RET_ENC_ERRNO, exit_rsa);
2092820928
}
20929+
derSz = FOURK_BUF;
20930+
#else
20931+
derSz = sizeof(der);
2092920932
#endif
20930-
derSz = wc_RsaKeyToDer(genKey, der, FOURK_BUF);
20933+
derSz = wc_RsaKeyToDer(genKey, der, derSz);
2093120934
if (derSz < 0) {
2093220935
ERROR_OUT(WC_TEST_RET_ENC_EC(derSz), exit_rsa);
2093320936
}

0 commit comments

Comments
 (0)