From: Dr. Stephen Henson Date: Tue, 13 Jul 1999 00:00:05 +0000 (+0000) Subject: Eliminate a warning: BN_mod_inverse() returns a (BIGNUM *) and remove and X-Git-Tag: OpenSSL_0_9_4~101 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=924154d9f2d715b229077f594d928d7b2962814d;p=oweals%2Fopenssl.git Eliminate a warning: BN_mod_inverse() returns a (BIGNUM *) and remove and unnecessary cast. --- diff --git a/crypto/rsa/rsa_chk.c b/crypto/rsa/rsa_chk.c index 8e99fe019d..50c5947412 100644 --- a/crypto/rsa/rsa_chk.c +++ b/crypto/rsa/rsa_chk.c @@ -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) { diff --git a/crypto/rsa/rsa_gen.c b/crypto/rsa/rsa_gen.c index 89e2f2e2e2..3ed6edd6a1 100644 --- a/crypto/rsa/rsa_gen.c +++ b/crypto/rsa/rsa_gen.c @@ -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) */