diff options
author | Colin Watson <cjwatson@debian.org> | 2018-04-03 08:20:28 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2018-04-03 08:20:28 +0100 |
commit | ed6ae9c1a014a08ff5db3d768f01f2e427eeb476 (patch) | |
tree | 601025e307745d351946c01ab13f419ddb6dae29 /dh.c | |
parent | 62f54f20bf351468e0124f63cc2902ee40d9b0e9 (diff) | |
parent | a0349a1cc4a18967ad1dbff5389bcdf9da098814 (diff) |
Import openssh_7.7p1.orig.tar.gz
Diffstat (limited to 'dh.c')
-rw-r--r-- | dh.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh.c,v 1.62 2016/12/15 21:20:41 dtucker Exp $ */ | 1 | /* $OpenBSD: dh.c,v 1.63 2018/02/07 02:06:50 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Niels Provos. All rights reserved. | 3 | * Copyright (c) 2000 Niels Provos. All rights reserved. |
4 | * | 4 | * |
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | 27 | ||
28 | #ifdef WITH_OPENSSL | ||
28 | 29 | ||
29 | #include <openssl/bn.h> | 30 | #include <openssl/bn.h> |
30 | #include <openssl/dh.h> | 31 | #include <openssl/dh.h> |
@@ -134,10 +135,8 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg) | |||
134 | return 1; | 135 | return 1; |
135 | 136 | ||
136 | fail: | 137 | fail: |
137 | if (dhg->g != NULL) | 138 | BN_clear_free(dhg->g); |
138 | BN_clear_free(dhg->g); | 139 | BN_clear_free(dhg->p); |
139 | if (dhg->p != NULL) | ||
140 | BN_clear_free(dhg->p); | ||
141 | dhg->g = dhg->p = NULL; | 140 | dhg->g = dhg->p = NULL; |
142 | return 0; | 141 | return 0; |
143 | } | 142 | } |
@@ -465,3 +464,5 @@ dh_estimate(int bits) | |||
465 | return 7680; | 464 | return 7680; |
466 | return 8192; | 465 | return 8192; |
467 | } | 466 | } |
467 | |||
468 | #endif /* WITH_OPENSSL */ | ||