summaryrefslogtreecommitdiff
path: root/kex.c
diff options
context:
space:
mode:
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/kex.c b/kex.c
index c65e28f94..58349fc19 100644
--- a/kex.c
+++ b/kex.c
@@ -50,6 +50,10 @@
50#include "monitor.h" 50#include "monitor.h"
51#include "roaming.h" 51#include "roaming.h"
52 52
53#ifdef GSSAPI
54#include "ssh-gss.h"
55#endif
56
53#if OPENSSL_VERSION_NUMBER >= 0x00907000L 57#if OPENSSL_VERSION_NUMBER >= 0x00907000L
54# if defined(HAVE_EVP_SHA256) 58# if defined(HAVE_EVP_SHA256)
55# define evp_ssh_sha256 EVP_sha256 59# define evp_ssh_sha256 EVP_sha256
@@ -358,6 +362,20 @@ choose_kex(Kex *k, char *client, char *server)
358 k->kex_type = KEX_ECDH_SHA2; 362 k->kex_type = KEX_ECDH_SHA2;
359 k->evp_md = kex_ecdh_name_to_evpmd(k->name); 363 k->evp_md = kex_ecdh_name_to_evpmd(k->name);
360#endif 364#endif
365#ifdef GSSAPI
366 } else if (strncmp(k->name, KEX_GSS_GEX_SHA1_ID,
367 sizeof(KEX_GSS_GEX_SHA1_ID) - 1) == 0) {
368 k->kex_type = KEX_GSS_GEX_SHA1;
369 k->evp_md = EVP_sha1();
370 } else if (strncmp(k->name, KEX_GSS_GRP1_SHA1_ID,
371 sizeof(KEX_GSS_GRP1_SHA1_ID) - 1) == 0) {
372 k->kex_type = KEX_GSS_GRP1_SHA1;
373 k->evp_md = EVP_sha1();
374 } else if (strncmp(k->name, KEX_GSS_GRP14_SHA1_ID,
375 sizeof(KEX_GSS_GRP14_SHA1_ID) - 1) == 0) {
376 k->kex_type = KEX_GSS_GRP14_SHA1;
377 k->evp_md = EVP_sha1();
378#endif
361 } else 379 } else
362 fatal("bad kex alg %s", k->name); 380 fatal("bad kex alg %s", k->name);
363} 381}