diff options
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 */ | ||