Eliminate a warning: BN_mod_inverse() returns a (BIGNUM *) and remove and
authorDr. Stephen Henson <steve@openssl.org>
Tue, 13 Jul 1999 00:00:05 +0000 (00:00 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 13 Jul 1999 00:00:05 +0000 (00:00 +0000)
unnecessary cast.

crypto/rsa/rsa_chk.c
crypto/rsa/rsa_gen.c

index 8e99fe019dd67e1d2bf131d4f7b7074990036437..50c5947412b93dcd1b8980ad1f2ccac0c21e1c9e 100644 (file)
@@ -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)
                {
index 89e2f2e2e2d527c594695d425dba3c0f7eebec47..3ed6edd6a175d80938d4d98eba5f8a4ed6c082a2 100644 (file)
@@ -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) */