mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-27 08:52:23 +01:00
peer review -- add !WC_NO_RNG gates around WC_RNG changes in wolfcrypt/src/rsa.c and wolfssl/wolfcrypt/rsa.h.
This commit is contained in:
@@ -5254,7 +5254,7 @@ int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng)
|
||||
#endif /* !FIPS || FIPS_VER >= 2 */
|
||||
#endif /* WOLFSSL_KEY_GEN */
|
||||
|
||||
|
||||
#ifndef WC_NO_RNG
|
||||
int wc_RsaSetRNG(RsaKey* key, WC_RNG* rng)
|
||||
{
|
||||
if (key == NULL || rng == NULL)
|
||||
@@ -5264,6 +5264,7 @@ int wc_RsaSetRNG(RsaKey* key, WC_RNG* rng)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* !WC_NO_RNG */
|
||||
|
||||
#ifdef WC_RSA_NONBLOCK
|
||||
int wc_RsaSetNonBlock(RsaKey* key, RsaNb* nb)
|
||||
|
||||
@@ -214,9 +214,11 @@ struct RsaKey {
|
||||
int type; /* public or private */
|
||||
int state;
|
||||
word32 dataLen;
|
||||
#ifndef WC_NO_RNG
|
||||
WC_RNG* rng; /* for PrivateDecrypt blinding and
|
||||
* _ifc_pairwise_consistency_test()
|
||||
*/
|
||||
#endif
|
||||
#ifdef WOLFSSL_SE050
|
||||
word32 keyId;
|
||||
byte keyIdSet;
|
||||
@@ -403,7 +405,9 @@ WOLFSSL_API int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz,
|
||||
WOLFSSL_API int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen);
|
||||
#endif
|
||||
|
||||
#ifndef WC_NO_RNG
|
||||
WOLFSSL_API int wc_RsaSetRNG(RsaKey* key, WC_RNG* rng);
|
||||
#endif
|
||||
#ifdef WC_RSA_NONBLOCK
|
||||
WOLFSSL_API int wc_RsaSetNonBlock(RsaKey* key, RsaNb* nb);
|
||||
#ifdef WC_RSA_NONBLOCK_TIME
|
||||
|
||||
Reference in New Issue
Block a user