Skip to content

Commit 418a3bf

Browse files
authored
Merge pull request #9698 from dgarske/rsa_no_rng2
More fixes for NO RNG and NO check key
2 parents 2a449eb + f52930b commit 418a3bf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29812,7 +29812,7 @@ static int DecodePrivateKey_ex(WOLFSSL *ssl, byte keyType, const DerBuffer* key,
2981229812
}
2981329813
}
2981429814

29815-
#ifdef WOLF_PRIVATE_KEY_ID
29815+
#if defined(WOLF_PRIVATE_KEY_ID) && !defined(NO_CHECK_PRIVATE_KEY)
2981629816
if (keyDevId != INVALID_DEVID && (keyIdSet || keyLabelSet)) {
2981729817
/* Set hsType */
2981829818
if (keyType == rsa_sa_algo)

wolfcrypt/src/rsa.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3792,7 +3792,7 @@ int wc_RsaPrivateDecryptInline(byte* in, word32 inLen, byte** out, RsaKey* key)
37923792
{
37933793
WC_RNG* rng;
37943794
int ret;
3795-
#ifdef WC_RSA_BLINDING
3795+
#if defined(WC_RSA_BLINDING) && !defined(WC_NO_RNG)
37963796
if (key == NULL) {
37973797
return BAD_FUNC_ARG;
37983798
}
@@ -3816,7 +3816,7 @@ int wc_RsaPrivateDecryptInline_ex(byte* in, word32 inLen, byte** out,
38163816
{
38173817
WC_RNG* rng;
38183818
int ret;
3819-
#ifdef WC_RSA_BLINDING
3819+
#if defined(WC_RSA_BLINDING) && !defined(WC_NO_RNG)
38203820
if (key == NULL) {
38213821
return BAD_FUNC_ARG;
38223822
}
@@ -3839,7 +3839,7 @@ int wc_RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out,
38393839
{
38403840
WC_RNG* rng;
38413841
int ret;
3842-
#ifdef WC_RSA_BLINDING
3842+
#if defined(WC_RSA_BLINDING) && !defined(WC_NO_RNG)
38433843
if (key == NULL) {
38443844
return BAD_FUNC_ARG;
38453845
}
@@ -3863,7 +3863,7 @@ int wc_RsaPrivateDecrypt_ex(const byte* in, word32 inLen, byte* out,
38633863
{
38643864
WC_RNG* rng;
38653865
int ret;
3866-
#ifdef WC_RSA_BLINDING
3866+
#if defined(WC_RSA_BLINDING) && !defined(WC_NO_RNG)
38673867
if (key == NULL) {
38683868
return BAD_FUNC_ARG;
38693869
}
@@ -3931,7 +3931,7 @@ int wc_RsaSSL_Verify_ex2(const byte* in, word32 inLen, byte* out, word32 outLen
39313931
return BAD_FUNC_ARG;
39323932
}
39333933

3934-
#ifdef WC_RSA_BLINDING
3934+
#if defined(WC_RSA_BLINDING) && !defined(WC_NO_RNG)
39353935
rng = key->rng;
39363936
#else
39373937
rng = NULL;

0 commit comments

Comments
 (0)