diff options
author | 2014-07-10 12:36:58 +0000 | |
---|---|---|
committer | 2014-07-10 12:36:58 +0000 | |
commit | e14dda457e385658400a207500810643da22ff97 (patch) | |
tree | cc4e51aa72608b55e8fcd782d5648f81c18169e6 /lib/libcrypto | |
parent | make asn1 free safe to call with null pointers of any type. (diff) | |
download | wireguard-openbsd-e14dda457e385658400a207500810643da22ff97.tar.xz wireguard-openbsd-e14dda457e385658400a207500810643da22ff97.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 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/rsa/rsa_crpt.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/libcrypto/rsa/rsa_crpt.c b/lib/libcrypto/rsa/rsa_crpt.c index 5edd2d7c5cc..5de69a6fb5e 100644 --- a/lib/libcrypto/rsa/rsa_crpt.c +++ b/lib/libcrypto/rsa/rsa_crpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_crpt.c,v 1.8 2014/07/10 11:35:31 jsing Exp $ */ +/* $OpenBSD: rsa_crpt.c,v 1.9 2014/07/10 12:36:58 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -177,11 +177,6 @@ RSA_setup_blinding(RSA *rsa, BN_CTX *in_ctx) ctx = in_ctx; BN_CTX_start(ctx); - e = BN_CTX_get(ctx); - if (e == NULL) { - RSAerr(RSA_F_RSA_SETUP_BLINDING, ERR_R_MALLOC_FAILURE); - goto err; - } if (rsa->e == NULL) { e = rsa_get_public_exp(rsa->d, rsa->p, rsa->q, ctx); |