diff options
Diffstat (limited to 'kex.h')
-rw-r--r-- | kex.h | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -102,6 +102,15 @@ enum kex_exchange { | |||
102 | KEX_ECDH_SHA2, | 102 | KEX_ECDH_SHA2, |
103 | KEX_C25519_SHA256, | 103 | KEX_C25519_SHA256, |
104 | KEX_KEM_SNTRUP4591761X25519_SHA512, | 104 | KEX_KEM_SNTRUP4591761X25519_SHA512, |
105 | #ifdef GSSAPI | ||
106 | KEX_GSS_GRP1_SHA1, | ||
107 | KEX_GSS_GRP14_SHA1, | ||
108 | KEX_GSS_GRP14_SHA256, | ||
109 | KEX_GSS_GRP16_SHA512, | ||
110 | KEX_GSS_GEX_SHA1, | ||
111 | KEX_GSS_NISTP256_SHA256, | ||
112 | KEX_GSS_C25519_SHA256, | ||
113 | #endif | ||
105 | KEX_MAX | 114 | KEX_MAX |
106 | }; | 115 | }; |
107 | 116 | ||
@@ -153,6 +162,12 @@ struct kex { | |||
153 | u_int flags; | 162 | u_int flags; |
154 | int hash_alg; | 163 | int hash_alg; |
155 | int ec_nid; | 164 | int ec_nid; |
165 | #ifdef GSSAPI | ||
166 | int gss_deleg_creds; | ||
167 | int gss_trust_dns; | ||
168 | char *gss_host; | ||
169 | char *gss_client; | ||
170 | #endif | ||
156 | char *failed_choice; | 171 | char *failed_choice; |
157 | int (*verify_host_key)(struct sshkey *, struct ssh *); | 172 | int (*verify_host_key)(struct sshkey *, struct ssh *); |
158 | struct sshkey *(*load_host_public_key)(int, int, struct ssh *); | 173 | struct sshkey *(*load_host_public_key)(int, int, struct ssh *); |
@@ -174,8 +189,10 @@ struct kex { | |||
174 | 189 | ||
175 | int kex_names_valid(const char *); | 190 | int kex_names_valid(const char *); |
176 | char *kex_alg_list(char); | 191 | char *kex_alg_list(char); |
192 | char *kex_gss_alg_list(char); | ||
177 | char *kex_names_cat(const char *, const char *); | 193 | char *kex_names_cat(const char *, const char *); |
178 | int kex_assemble_names(char **, const char *, const char *); | 194 | int kex_assemble_names(char **, const char *, const char *); |
195 | int kex_gss_names_valid(const char *); | ||
179 | 196 | ||
180 | int kex_exchange_identification(struct ssh *, int, const char *); | 197 | int kex_exchange_identification(struct ssh *, int, const char *); |
181 | 198 | ||
@@ -202,6 +219,12 @@ int kexgex_client(struct ssh *); | |||
202 | int kexgex_server(struct ssh *); | 219 | int kexgex_server(struct ssh *); |
203 | int kex_gen_client(struct ssh *); | 220 | int kex_gen_client(struct ssh *); |
204 | int kex_gen_server(struct ssh *); | 221 | int kex_gen_server(struct ssh *); |
222 | #if defined(GSSAPI) && defined(WITH_OPENSSL) | ||
223 | int kexgssgex_client(struct ssh *); | ||
224 | int kexgssgex_server(struct ssh *); | ||
225 | int kexgss_client(struct ssh *); | ||
226 | int kexgss_server(struct ssh *); | ||
227 | #endif | ||
205 | 228 | ||
206 | int kex_dh_keypair(struct kex *); | 229 | int kex_dh_keypair(struct kex *); |
207 | int kex_dh_enc(struct kex *, const struct sshbuf *, struct sshbuf **, | 230 | int kex_dh_enc(struct kex *, const struct sshbuf *, struct sshbuf **, |
@@ -234,6 +257,12 @@ int kexgex_hash(int, const struct sshbuf *, const struct sshbuf *, | |||
234 | const BIGNUM *, const u_char *, size_t, | 257 | const BIGNUM *, const u_char *, size_t, |
235 | u_char *, size_t *); | 258 | u_char *, size_t *); |
236 | 259 | ||
260 | int kex_gen_hash(int hash_alg, const struct sshbuf *client_version, | ||
261 | const struct sshbuf *server_version, const struct sshbuf *client_kexinit, | ||
262 | const struct sshbuf *server_kexinit, const struct sshbuf *server_host_key_blob, | ||
263 | const struct sshbuf *client_pub, const struct sshbuf *server_pub, | ||
264 | const struct sshbuf *shared_secret, u_char *hash, size_t *hashlen); | ||
265 | |||
237 | void kexc25519_keygen(u_char key[CURVE25519_SIZE], u_char pub[CURVE25519_SIZE]) | 266 | void kexc25519_keygen(u_char key[CURVE25519_SIZE], u_char pub[CURVE25519_SIZE]) |
238 | __attribute__((__bounded__(__minbytes__, 1, CURVE25519_SIZE))) | 267 | __attribute__((__bounded__(__minbytes__, 1, CURVE25519_SIZE))) |
239 | __attribute__((__bounded__(__minbytes__, 2, CURVE25519_SIZE))); | 268 | __attribute__((__bounded__(__minbytes__, 2, CURVE25519_SIZE))); |