Fix mistake in the FIPS RSA keygen causing key generation failures.

This commit is contained in:
Tomas Mraz 2018-04-05 16:44:48 +02:00
parent 08db5cbcb9
commit 5d5075d4c9

View File

@ -11009,7 +11009,7 @@ diff -up openssl-1.1.0h/crypto/rsa/rsa_gen.c.fips openssl-1.1.0h/crypto/rsa/rsa_
+ goto err;
+ if (r > 0)
+ break;
+ }
+ } else {
+ error = ERR_peek_last_error();
+ if (ERR_GET_LIB(error) == ERR_LIB_BN
+ && ERR_GET_REASON(error) == BN_R_NO_INVERSE) {
@ -11018,7 +11018,7 @@ diff -up openssl-1.1.0h/crypto/rsa/rsa_gen.c.fips openssl-1.1.0h/crypto/rsa/rsa_
+ } else {
+ goto err;
+ }
+
+ }
+ if (!BN_GENCB_call(cb, 2, n++))
+ goto err;
+ }
@ -11060,7 +11060,7 @@ diff -up openssl-1.1.0h/crypto/rsa/rsa_gen.c.fips openssl-1.1.0h/crypto/rsa/rsa_
+ goto err;
+ if (r > 0)
+ break;
+ }
+ } else {
+ error = ERR_peek_last_error();
+ if (ERR_GET_LIB(error) == ERR_LIB_BN
+ && ERR_GET_REASON(error) == BN_R_NO_INVERSE) {
@ -11069,7 +11069,7 @@ diff -up openssl-1.1.0h/crypto/rsa/rsa_gen.c.fips openssl-1.1.0h/crypto/rsa/rsa_
+ } else {
+ goto err;
+ }
+
+ }
+ if (!BN_GENCB_call(cb, 2, n++))
+ goto err;
+ }