Eliminate a warning: BN_mod_inverse() returns a (BIGNUM *) and remove and
unnecessary cast.
This commit is contained in:
parent
b617a5be59
commit
924154d9f2
@ -131,8 +131,7 @@ int RSA_check_key(RSA *key)
|
||||
}
|
||||
|
||||
/* iqmp = q^-1 mod p? */
|
||||
r = BN_mod_inverse(i, key->q, key->p, ctx);
|
||||
if (!r) { ret = -1; goto err; }
|
||||
if(!BN_mod_inverse(i, key->q, key->p, ctx)) { ret = -1; goto err; }
|
||||
|
||||
if (BN_cmp(i, key->iqmp) != 0)
|
||||
{
|
||||
|
@ -157,7 +157,7 @@ RSA *RSA_generate_key(int bits, unsigned long e_value,
|
||||
goto err;
|
||||
}
|
||||
*/
|
||||
rsa->d=(BIGNUM *)BN_mod_inverse(NULL,rsa->e,r0,ctx2); /* d */
|
||||
rsa->d=BN_mod_inverse(NULL,rsa->e,r0,ctx2); /* d */
|
||||
if (rsa->d == NULL) goto err;
|
||||
|
||||
/* calculate d mod (p-1) */
|
||||
|
Loading…
Reference in New Issue
Block a user