diff options
author | Geoff Thorpe <geoff@openssl.org> | 2003-10-29 04:06:50 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2003-10-29 04:06:50 +0000 |
commit | 9d473aa2e4076beb959bc9701786a0860877ee12 (patch) | |
tree | 4a14c245681bcfc01549ca827486d65f0404268a /crypto/bn/bn_depr.c | |
parent | 6145b0b1835f14167f8e9e4701251149f9c5373f (diff) |
When OPENSSL_NO_DEPRECATED is defined, deprecated functions are (or should
be) precompiled out in the API headers. This change is to ensure that if
it is defined when compiling openssl, the deprecated functions aren't
implemented either.
Diffstat (limited to 'crypto/bn/bn_depr.c')
-rw-r--r-- | crypto/bn/bn_depr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/bn/bn_depr.c b/crypto/bn/bn_depr.c index 35e9127288..09ad52e7c6 100644 --- a/crypto/bn/bn_depr.c +++ b/crypto/bn/bn_depr.c @@ -62,6 +62,9 @@ #include "bn_lcl.h" #include <openssl/rand.h> +static void *dummy=&dummy; + +#ifndef OPENSSL_NO_DEPRECATED BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, const BIGNUM *add, const BIGNUM *rem, void (*callback)(int,int,void *), void *cb_arg) @@ -78,6 +81,7 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, } else rnd=ret; + bn_verify(rnd); if(!BN_generate_prime_ex(rnd, bits, safe, add, rem, &cb)) goto err; @@ -85,6 +89,7 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, found = 1; err: if (!found && (ret == NULL) && (rnd != NULL)) BN_free(rnd); + if(found) bn_verify(rnd); return(found ? rnd : NULL); } @@ -106,3 +111,4 @@ int BN_is_prime_fasttest(const BIGNUM *a, int checks, return BN_is_prime_fasttest_ex(a, checks, ctx_passed, do_trial_division, &cb); } +#endif |