mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
This commit is contained in:
19
src/ssl.c
19
src/ssl.c
@@ -33351,19 +33351,22 @@ WOLFSSL_RSA* wolfSSL_RSA_generate_key(int len, unsigned long e,
|
|||||||
WOLFSSL_MSG("memory error");
|
WOLFSSL_MSG("memory error");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (;;) {
|
|
||||||
int gen_ret = wolfSSL_RSA_generate_key_native(rsa, len, bn, NULL);
|
|
||||||
if (gen_ret == WOLFSSL_ERROR_NONE)
|
|
||||||
break;
|
|
||||||
#ifdef HAVE_FIPS
|
#ifdef HAVE_FIPS
|
||||||
else if (gen_ret == PRIME_GEN_E)
|
for (;;)
|
||||||
continue;
|
#endif
|
||||||
|
{
|
||||||
|
int gen_ret = wolfSSL_RSA_generate_key_native(rsa, len, bn, NULL);
|
||||||
|
if (gen_ret != WOLFSSL_ERROR_NONE) {
|
||||||
|
#ifdef HAVE_FIPS
|
||||||
|
if (gen_ret == PRIME_GEN_E)
|
||||||
|
continue;
|
||||||
#endif
|
#endif
|
||||||
else {
|
|
||||||
wolfSSL_RSA_free(rsa);
|
wolfSSL_RSA_free(rsa);
|
||||||
rsa = NULL;
|
rsa = NULL;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_FIPS
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wolfSSL_BN_free(bn);
|
wolfSSL_BN_free(bn);
|
||||||
|
Reference in New Issue
Block a user