Commit 55833a8d authored by Mansour Ahmadi's avatar Mansour Ahmadi Committed by Matt Caswell
Browse files

add missing check for BN_mod_inverse

parent 4fea7005
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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: