summaryrefslogtreecommitdiff
path: root/kexecdhs.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-09-10 11:39:26 +1000
committerDamien Miller <djm@mindrot.org>2010-09-10 11:39:26 +1000
commit6af914a15c0c33e8b5bab5ca61919b8562ff1db9 (patch)
treeb87546d8a88a05e6fd600cbb2b8c0b132278cb10 /kexecdhs.c
parent041ab7c1e7d6514ed84a539a767f79ffb356e807 (diff)
- (djm) [authfd.c authfile.c bufec.c buffer.h configure.ac kex.h kexecdh.c]
[kexecdhc.c kexecdhs.c key.c key.h myproposal.h packet.c readconf.c] [ssh-agent.c ssh-ecdsa.c ssh-keygen.c ssh.c] Disable ECDH and ECDSA on platforms that don't have the requisite OpenSSL support. ok dtucker@
Diffstat (limited to 'kexecdhs.c')
-rw-r--r--kexecdhs.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/kexecdhs.c b/kexecdhs.c
index e49a0ef37..d2c3feb09 100644
--- a/kexecdhs.c
+++ b/kexecdhs.c
@@ -30,8 +30,6 @@
30#include <string.h> 30#include <string.h>
31#include <signal.h> 31#include <signal.h>
32 32
33#include <openssl/ecdh.h>
34
35#include "xmalloc.h" 33#include "xmalloc.h"
36#include "buffer.h" 34#include "buffer.h"
37#include "key.h" 35#include "key.h"
@@ -46,6 +44,10 @@
46#endif 44#endif
47#include "monitor_wrap.h" 45#include "monitor_wrap.h"
48 46
47#ifdef OPENSSL_HAS_ECC
48
49#include <openssl/ecdh.h>
50
49void 51void
50kexecdh_server(Kex *kex) 52kexecdh_server(Kex *kex)
51{ 53{
@@ -161,3 +163,10 @@ kexecdh_server(Kex *kex)
161 BN_clear_free(shared_secret); 163 BN_clear_free(shared_secret);
162 kex_finish(kex); 164 kex_finish(kex);
163} 165}
166#else /* OPENSSL_HAS_ECC */
167void
168kexecdh_server(Kex *kex)
169{
170 fatal("ECC support is not enabled");
171}
172#endif /* OPENSSL_HAS_ECC */