diff options
Diffstat (limited to 'kexecdhc.c')
-rw-r--r-- | kexecdhc.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kexecdhc.c b/kexecdhc.c index 7ac7b1ee2..297a0e5a9 100644 --- a/kexecdhc.c +++ b/kexecdhc.c | |||
@@ -32,8 +32,6 @@ | |||
32 | #include <string.h> | 32 | #include <string.h> |
33 | #include <signal.h> | 33 | #include <signal.h> |
34 | 34 | ||
35 | #include <openssl/ecdh.h> | ||
36 | |||
37 | #include "xmalloc.h" | 35 | #include "xmalloc.h" |
38 | #include "buffer.h" | 36 | #include "buffer.h" |
39 | #include "key.h" | 37 | #include "key.h" |
@@ -44,6 +42,10 @@ | |||
44 | #include "dh.h" | 42 | #include "dh.h" |
45 | #include "ssh2.h" | 43 | #include "ssh2.h" |
46 | 44 | ||
45 | #ifdef OPENSSL_HAS_ECC | ||
46 | |||
47 | #include <openssl/ecdh.h> | ||
48 | |||
47 | void | 49 | void |
48 | kexecdh_client(Kex *kex) | 50 | kexecdh_client(Kex *kex) |
49 | { | 51 | { |
@@ -156,3 +158,10 @@ kexecdh_client(Kex *kex) | |||
156 | BN_clear_free(shared_secret); | 158 | BN_clear_free(shared_secret); |
157 | kex_finish(kex); | 159 | kex_finish(kex); |
158 | } | 160 | } |
161 | #else /* OPENSSL_HAS_ECC */ | ||
162 | void | ||
163 | kexecdh_client(Kex *kex) | ||
164 | { | ||
165 | fatal("ECC support is not enabled"); | ||
166 | } | ||
167 | #endif /* OPENSSL_HAS_ECC */ | ||