diff options
author | Geoff Thorpe <geoff@openssl.org> | 2002-12-08 16:45:26 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2002-12-08 16:45:26 +0000 |
commit | e189872486477c2bb9b041cb00f4390ef4aa911b (patch) | |
tree | d5a3ad328351adddf360315937074087669ee83d /crypto/bn/bn_depr.c | |
parent | fdaea9ed2e5644b98baae983ce7a55100c956999 (diff) |
Nils Larsch submitted;
- a patch to fix a memory leak in rsa_gen.c
- a note about compiler warnings with unions
- a note about improving structure element names
This applies his patch and implements a solution to the notes.
Diffstat (limited to 'crypto/bn/bn_depr.c')
-rw-r--r-- | crypto/bn/bn_depr.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/crypto/bn/bn_depr.c b/crypto/bn/bn_depr.c index 76c349833c..35e9127288 100644 --- a/crypto/bn/bn_depr.c +++ b/crypto/bn/bn_depr.c @@ -70,9 +70,7 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, BIGNUM *rnd=NULL; int found = 0; - cb.ver = 1; - cb.arg = cb_arg; - cb.cb_1 = callback; + BN_GENCB_set_old(&cb, callback, cb_arg); if (ret == NULL) { @@ -94,9 +92,7 @@ int BN_is_prime(const BIGNUM *a, int checks, void (*callback)(int,int,void *), BN_CTX *ctx_passed, void *cb_arg) { BN_GENCB cb; - cb.ver = 1; - cb.arg = cb_arg; - cb.cb_1 = callback; + BN_GENCB_set_old(&cb, callback, cb_arg); return BN_is_prime_ex(a, checks, ctx_passed, &cb); } @@ -106,9 +102,7 @@ int BN_is_prime_fasttest(const BIGNUM *a, int checks, int do_trial_division) { BN_GENCB cb; - cb.ver = 1; - cb.arg = cb_arg; - cb.cb_1 = callback; + BN_GENCB_set_old(&cb, callback, cb_arg); return BN_is_prime_fasttest_ex(a, checks, ctx_passed, do_trial_division, &cb); } |