diff options
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_crpt.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_crpt.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_crpt.c b/src/lib/libcrypto/rsa/rsa_crpt.c index b057dd2201..cf7f9a328b 100644 --- a/src/lib/libcrypto/rsa/rsa_crpt.c +++ b/src/lib/libcrypto/rsa/rsa_crpt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_crpt.c,v 1.12 2014/10/18 17:20:40 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_crpt.c,v 1.13 2015/02/09 15:49:22 jsing 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 | * |
@@ -145,10 +145,11 @@ rsa_get_public_exp(const BIGNUM *d, const BIGNUM *p, const BIGNUM *q, | |||
145 | return NULL; | 145 | return NULL; |
146 | 146 | ||
147 | BN_CTX_start(ctx); | 147 | BN_CTX_start(ctx); |
148 | r0 = BN_CTX_get(ctx); | 148 | if ((r0 = BN_CTX_get(ctx)) == NULL) |
149 | r1 = BN_CTX_get(ctx); | 149 | goto err; |
150 | r2 = BN_CTX_get(ctx); | 150 | if ((r1 = BN_CTX_get(ctx)) == NULL) |
151 | if (r2 == NULL) | 151 | goto err; |
152 | if ((r2 = BN_CTX_get(ctx)) == NULL) | ||
152 | goto err; | 153 | goto err; |
153 | 154 | ||
154 | if (!BN_sub(r1, p, BN_value_one())) | 155 | if (!BN_sub(r1, p, BN_value_one())) |