suppress i2d_RSAPublicKey with HAVE_FAST_RSA

This commit is contained in:
Takashi Kojo
2018-05-05 17:41:40 +09:00
parent 6cef2e5d31
commit ad71f44f3c
2 changed files with 5 additions and 3 deletions

View File

@@ -27496,6 +27496,7 @@ WOLFSSL_RSA *wolfSSL_d2i_RSAPublicKey(WOLFSSL_RSA **r, const unsigned char **pp,
return rsa;
}
#if !defined(HAVE_FAST_RSA)
int wolfSSL_i2d_RSAPublicKey(WOLFSSL_RSA *rsa, const unsigned char **pp)
{
byte *der;
@@ -27525,12 +27526,12 @@ int wolfSSL_i2d_RSAPublicKey(WOLFSSL_RSA *rsa, const unsigned char **pp)
return ret;
}
/* return WOLFSSL_SUCCESS if success, WOLFSSL_FATAL_ERROR if error */
int wolfSSL_RSA_LoadDer(WOLFSSL_RSA* rsa, const unsigned char* derBuf, int derSz)
{
return wolfSSL_RSA_LoadDer_ex(rsa, derBuf, derSz, WOLFSSL_RSA_LOAD_PRIVATE);
}
#endif /* #if !defined(HAVE_FAST_RSA) */
int wolfSSL_RSA_LoadDer_ex(WOLFSSL_RSA* rsa, const unsigned char* derBuf,
int derSz, int opt)

View File

@@ -9852,9 +9852,10 @@ static int test_wc_RsaKeyToDer (void)
* Testing wc_RsaKeyToPublicDer()
*/
static int test_wc_RsaKeyToPublicDer (void)
{
{
int ret = 0;
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
#if (!defined(NO_RSA) || !defined(HAVE_FAST_RSA) || defined(WOLFSSL_KEY_GEN)) && \
(defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
RsaKey key;
WC_RNG rng;
byte* der;