aboutsummaryrefslogtreecommitdiff
path: root/crypto/rsa/rsa_x931g.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/rsa/rsa_x931g.c')
-rw-r--r--crypto/rsa/rsa_x931g.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/rsa/rsa_x931g.c b/crypto/rsa/rsa_x931g.c
index 3563670a12ac..15e40e8d1dd7 100644
--- a/crypto/rsa/rsa_x931g.c
+++ b/crypto/rsa/rsa_x931g.c
@@ -128,6 +128,8 @@ int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1,
/* calculate inverse of q mod p */
rsa->iqmp = BN_mod_inverse(NULL, rsa->q, rsa->p, ctx2);
+ if (rsa->iqmp == NULL)
+ goto err;
ret = 1;
err: