diff options
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_gen.c | 8 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/dsa/dsa_gen.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_gen.c b/src/lib/libcrypto/dsa/dsa_gen.c index c1664d5f8a..73ae485349 100644 --- a/src/lib/libcrypto/dsa/dsa_gen.c +++ b/src/lib/libcrypto/dsa/dsa_gen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_gen.c,v 1.19 2015/02/15 08:48:24 miod Exp $ */ | 1 | /* $OpenBSD: dsa_gen.c,v 1.20 2015/02/15 22:29:02 doug 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 | * |
@@ -139,13 +139,13 @@ dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, const EVP_MD *evpmd, | |||
139 | if (seed_in != NULL) | 139 | if (seed_in != NULL) |
140 | memcpy(seed, seed_in, seed_len); | 140 | memcpy(seed, seed_in, seed_len); |
141 | 141 | ||
142 | if ((ctx=BN_CTX_new()) == NULL) | ||
143 | goto err; | ||
144 | |||
145 | if ((mont=BN_MONT_CTX_new()) == NULL) | 142 | if ((mont=BN_MONT_CTX_new()) == NULL) |
146 | goto err; | 143 | goto err; |
147 | 144 | ||
145 | if ((ctx=BN_CTX_new()) == NULL) | ||
146 | goto err; | ||
148 | BN_CTX_start(ctx); | 147 | BN_CTX_start(ctx); |
148 | |||
149 | if ((r0 = BN_CTX_get(ctx)) == NULL) | 149 | if ((r0 = BN_CTX_get(ctx)) == NULL) |
150 | goto err; | 150 | goto err; |
151 | if ((g = BN_CTX_get(ctx)) == NULL) | 151 | if ((g = BN_CTX_get(ctx)) == NULL) |
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_gen.c b/src/lib/libssl/src/crypto/dsa/dsa_gen.c index c1664d5f8a..73ae485349 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_gen.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_gen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_gen.c,v 1.19 2015/02/15 08:48:24 miod Exp $ */ | 1 | /* $OpenBSD: dsa_gen.c,v 1.20 2015/02/15 22:29:02 doug 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 | * |
@@ -139,13 +139,13 @@ dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, const EVP_MD *evpmd, | |||
139 | if (seed_in != NULL) | 139 | if (seed_in != NULL) |
140 | memcpy(seed, seed_in, seed_len); | 140 | memcpy(seed, seed_in, seed_len); |
141 | 141 | ||
142 | if ((ctx=BN_CTX_new()) == NULL) | ||
143 | goto err; | ||
144 | |||
145 | if ((mont=BN_MONT_CTX_new()) == NULL) | 142 | if ((mont=BN_MONT_CTX_new()) == NULL) |
146 | goto err; | 143 | goto err; |
147 | 144 | ||
145 | if ((ctx=BN_CTX_new()) == NULL) | ||
146 | goto err; | ||
148 | BN_CTX_start(ctx); | 147 | BN_CTX_start(ctx); |
148 | |||
149 | if ((r0 = BN_CTX_get(ctx)) == NULL) | 149 | if ((r0 = BN_CTX_get(ctx)) == NULL) |
150 | goto err; | 150 | goto err; |
151 | if ((g = BN_CTX_get(ctx)) == NULL) | 151 | if ((g = BN_CTX_get(ctx)) == NULL) |