diff options
author | miod <> | 2014-07-10 12:36:58 +0000 |
---|---|---|
committer | miod <> | 2014-07-10 12:36:58 +0000 |
commit | 01835c580bc891d6c335f7dbe03b98ad207ba4ac (patch) | |
tree | c2323e8a8295623e3b0caaade991b8da223bb6e7 /src/lib/libssl/src | |
parent | 127e1875b8e530d9127881b8ef9fdf712f22c57b (diff) | |
download | openbsd-01835c580bc891d6c335f7dbe03b98ad207ba4ac.tar.gz openbsd-01835c580bc891d6c335f7dbe03b98ad207ba4ac.tar.bz2 openbsd-01835c580bc891d6c335f7dbe03b98ad207ba4ac.zip |
RSA_setup_blinding() gets a BN with BN_CTX_get(), returns `out of memory'
if it fails, then never uses it anymore, and may invoke a function which
needs more than one BN from the BN_CTX anyway, so this is pointless - remove
the BN_CTX_get() call and the test.
ok jsing
Diffstat (limited to 'src/lib/libssl/src')
-rw-r--r-- | src/lib/libssl/src/crypto/rsa/rsa_crpt.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_crpt.c b/src/lib/libssl/src/crypto/rsa/rsa_crpt.c index 5edd2d7c5c..5de69a6fb5 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_crpt.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_crpt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_crpt.c,v 1.8 2014/07/10 11:35:31 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_crpt.c,v 1.9 2014/07/10 12:36:58 miod Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -177,11 +177,6 @@ RSA_setup_blinding(RSA *rsa, BN_CTX *in_ctx) | |||
177 | ctx = in_ctx; | 177 | ctx = in_ctx; |
178 | 178 | ||
179 | BN_CTX_start(ctx); | 179 | BN_CTX_start(ctx); |
180 | e = BN_CTX_get(ctx); | ||
181 | if (e == NULL) { | ||
182 | RSAerr(RSA_F_RSA_SETUP_BLINDING, ERR_R_MALLOC_FAILURE); | ||
183 | goto err; | ||
184 | } | ||
185 | 180 | ||
186 | if (rsa->e == NULL) { | 181 | if (rsa->e == NULL) { |
187 | e = rsa_get_public_exp(rsa->d, rsa->p, rsa->q, ctx); | 182 | e = rsa_get_public_exp(rsa->d, rsa->p, rsa->q, ctx); |