diff options
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -53,6 +53,10 @@ | |||
53 | #include "roaming.h" | 53 | #include "roaming.h" |
54 | #include "digest.h" | 54 | #include "digest.h" |
55 | 55 | ||
56 | #ifdef GSSAPI | ||
57 | #include "ssh-gss.h" | ||
58 | #endif | ||
59 | |||
56 | #if OPENSSL_VERSION_NUMBER >= 0x00907000L | 60 | #if OPENSSL_VERSION_NUMBER >= 0x00907000L |
57 | # if defined(HAVE_EVP_SHA256) | 61 | # if defined(HAVE_EVP_SHA256) |
58 | # define evp_ssh_sha256 EVP_sha256 | 62 | # define evp_ssh_sha256 EVP_sha256 |
@@ -96,6 +100,14 @@ static const struct kexalg kexalgs[] = { | |||
96 | #endif /* HAVE_EVP_SHA256 */ | 100 | #endif /* HAVE_EVP_SHA256 */ |
97 | { NULL, -1, -1, -1}, | 101 | { NULL, -1, -1, -1}, |
98 | }; | 102 | }; |
103 | static const struct kexalg kexalg_prefixes[] = { | ||
104 | #ifdef GSSAPI | ||
105 | { KEX_GSS_GEX_SHA1_ID, KEX_GSS_GEX_SHA1, 0, SSH_DIGEST_SHA1 }, | ||
106 | { KEX_GSS_GRP1_SHA1_ID, KEX_GSS_GRP1_SHA1, 0, SSH_DIGEST_SHA1 }, | ||
107 | { KEX_GSS_GRP14_SHA1_ID, KEX_GSS_GRP14_SHA1, 0, SSH_DIGEST_SHA1 }, | ||
108 | #endif | ||
109 | { NULL, -1, -1, -1 }, | ||
110 | }; | ||
99 | 111 | ||
100 | char * | 112 | char * |
101 | kex_alg_list(char sep) | 113 | kex_alg_list(char sep) |
@@ -124,6 +136,10 @@ kex_alg_by_name(const char *name) | |||
124 | if (strcmp(k->name, name) == 0) | 136 | if (strcmp(k->name, name) == 0) |
125 | return k; | 137 | return k; |
126 | } | 138 | } |
139 | for (k = kexalg_prefixes; k->name != NULL; k++) { | ||
140 | if (strncmp(k->name, name, strlen(k->name)) == 0) | ||
141 | return k; | ||
142 | } | ||
127 | return NULL; | 143 | return NULL; |
128 | } | 144 | } |
129 | 145 | ||