diff options
author | markus <> | 2003-11-11 22:15:20 +0000 |
---|---|---|
committer | markus <> | 2003-11-11 22:15:20 +0000 |
commit | 38a053f575d6faf05903707a8e835dc231c7eca9 (patch) | |
tree | 6f8ff7f2313c890e1f52fd53451e7af46dad58b2 /src/lib/libcrypto/rsa/rsa_lib.c | |
parent | 76b1d16ba9a90ba98e7cfdc332eb843f02c06a1c (diff) | |
download | openbsd-38a053f575d6faf05903707a8e835dc231c7eca9.tar.gz openbsd-38a053f575d6faf05903707a8e835dc231c7eca9.tar.bz2 openbsd-38a053f575d6faf05903707a8e835dc231c7eca9.zip |
merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_lib.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_lib.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_lib.c b/src/lib/libcrypto/rsa/rsa_lib.c index 53c5092014..e4d622851e 100644 --- a/src/lib/libcrypto/rsa/rsa_lib.c +++ b/src/lib/libcrypto/rsa/rsa_lib.c | |||
@@ -316,7 +316,7 @@ void RSA_blinding_off(RSA *rsa) | |||
316 | 316 | ||
317 | int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx) | 317 | int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx) |
318 | { | 318 | { |
319 | BIGNUM *A,*Ai; | 319 | BIGNUM *A,*Ai = NULL; |
320 | BN_CTX *ctx; | 320 | BN_CTX *ctx; |
321 | int ret=0; | 321 | int ret=0; |
322 | 322 | ||
@@ -327,8 +327,12 @@ int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx) | |||
327 | else | 327 | else |
328 | ctx=p_ctx; | 328 | ctx=p_ctx; |
329 | 329 | ||
330 | /* XXXXX: Shouldn't this be RSA_blinding_off(rsa)? */ | ||
330 | if (rsa->blinding != NULL) | 331 | if (rsa->blinding != NULL) |
332 | { | ||
331 | BN_BLINDING_free(rsa->blinding); | 333 | BN_BLINDING_free(rsa->blinding); |
334 | rsa->blinding = NULL; | ||
335 | } | ||
332 | 336 | ||
333 | /* NB: similar code appears in setup_blinding (rsa_eay.c); | 337 | /* NB: similar code appears in setup_blinding (rsa_eay.c); |
334 | * this should be placed in a new function of its own, but for reasons | 338 | * this should be placed in a new function of its own, but for reasons |
@@ -356,9 +360,9 @@ int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx) | |||
356 | rsa->blinding->thread_id = CRYPTO_thread_id(); | 360 | rsa->blinding->thread_id = CRYPTO_thread_id(); |
357 | rsa->flags |= RSA_FLAG_BLINDING; | 361 | rsa->flags |= RSA_FLAG_BLINDING; |
358 | rsa->flags &= ~RSA_FLAG_NO_BLINDING; | 362 | rsa->flags &= ~RSA_FLAG_NO_BLINDING; |
359 | BN_free(Ai); | ||
360 | ret=1; | 363 | ret=1; |
361 | err: | 364 | err: |
365 | if (Ai != NULL) BN_free(Ai); | ||
362 | BN_CTX_end(ctx); | 366 | BN_CTX_end(ctx); |
363 | if (ctx != p_ctx) BN_CTX_free(ctx); | 367 | if (ctx != p_ctx) BN_CTX_free(ctx); |
364 | return(ret); | 368 | return(ret); |