From 50f8fb1475a83a405c9e3945b0b045573414f6ee Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Tue, 14 Jan 2020 19:37:29 +0100 Subject: [PATCH] Enable wc_RsaKeyToDer even when key generation is turned off --- src/ssl.c | 4 ++++ wolfssl/wolfcrypt/rsa.h | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index cb782945f..ae3248f77 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -69,6 +69,10 @@ #include +#ifndef NO_RSA + #include +#endif + #ifdef OPENSSL_EXTRA /* openssl headers begin */ #include diff --git a/wolfssl/wolfcrypt/rsa.h b/wolfssl/wolfcrypt/rsa.h index f51484f53..b8e41608a 100644 --- a/wolfssl/wolfcrypt/rsa.h +++ b/wolfssl/wolfcrypt/rsa.h @@ -278,9 +278,8 @@ WOLFSSL_API int wc_RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey*, word32); WOLFSSL_API int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz, const byte* e, word32 eSz, RsaKey* key); -#ifdef WOLFSSL_KEY_GEN - WOLFSSL_API int wc_RsaKeyToDer(RsaKey*, byte* output, word32 inLen); -#endif +WOLFSSL_API int wc_RsaKeyToDer(RsaKey*, byte* output, word32 inLen); + #ifdef WC_RSA_BLINDING WOLFSSL_API int wc_RsaSetRNG(RsaKey* key, WC_RNG* rng);