From cd5486a4e6c5247091753fbcf2413c20a1c5503a Mon Sep 17 00:00:00 2001 From: toddouska Date: Mon, 25 Jul 2016 15:33:28 -0700 Subject: [PATCH] fix user_rsa with blinding API addition --- wolfcrypt/user-crypto/include/user_rsa.h | 1 + wolfcrypt/user-crypto/src/rsa.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/wolfcrypt/user-crypto/include/user_rsa.h b/wolfcrypt/user-crypto/include/user_rsa.h index fbf9430fe..72d2c610e 100644 --- a/wolfcrypt/user-crypto/include/user_rsa.h +++ b/wolfcrypt/user-crypto/include/user_rsa.h @@ -105,6 +105,7 @@ WOLFSSL_API int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz, #endif WOLFSSL_API int wc_RsaFlattenPublicKey(RsaKey*, byte*, word32*, byte*, word32*); +WOLFSSL_API int wc_RsaSetRNG(RsaKey* key, WC_RNG* rng); #if defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_KEY_GEN) diff --git a/wolfcrypt/user-crypto/src/rsa.c b/wolfcrypt/user-crypto/src/rsa.c index 748c420c4..e39ee6e68 100644 --- a/wolfcrypt/user-crypto/src/rsa.c +++ b/wolfcrypt/user-crypto/src/rsa.c @@ -2670,5 +2670,19 @@ int wc_RsaKeyToPublicDer(RsaKey* key, byte* output, word32 inLen) #endif /* WOLFSSL_KEY_GEN */ +#ifdef WC_RSA_BLINDING + +int wc_RsaSetRNG(RsaKey* key, WC_RNG* rng) +{ + if (key == NULL) + return BAD_FUNC_ARG; + + (void)rng; + + return 0; +} + +#endif /* WC_RSA_BLINDING */ + #endif /* NO_RSA */