diff options
author | Damien Miller <djm@mindrot.org> | 2013-04-23 19:24:32 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-04-23 19:24:32 +1000 |
commit | ea11119eee3c5e2429b1f5f8688b25b028fa991a (patch) | |
tree | 5916295fcefb8665088f59a5431cb0c792fbf327 /kex.h | |
parent | a56086b9903b62c1c4fdedf01b68338fe4dc90e4 (diff) |
- djm@cvs.openbsd.org 2013/04/19 01:06:50
[authfile.c cipher.c cipher.h kex.c kex.h kexecdh.c kexecdhc.c kexecdhs.c]
[key.c key.h mac.c mac.h packet.c ssh.1 ssh.c]
add the ability to query supported ciphers, MACs, key type and KEX
algorithms to ssh. Includes some refactoring of KEX and key type handling
to be table-driven; ok markus@
Diffstat (limited to 'kex.h')
-rw-r--r-- | kex.h | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.h,v 1.54 2013/01/08 18:49:04 markus Exp $ */ | 1 | /* $OpenBSD: kex.h,v 1.55 2013/04/19 01:06:50 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
@@ -40,8 +40,9 @@ | |||
40 | #define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1" | 40 | #define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1" |
41 | #define KEX_DHGEX_SHA256 "diffie-hellman-group-exchange-sha256" | 41 | #define KEX_DHGEX_SHA256 "diffie-hellman-group-exchange-sha256" |
42 | #define KEX_RESUME "resume@appgate.com" | 42 | #define KEX_RESUME "resume@appgate.com" |
43 | /* The following represents the family of ECDH methods */ | 43 | #define KEX_ECDH_SHA2_NISTP256 "ecdh-sha2-nistp256" |
44 | #define KEX_ECDH_SHA2_STEM "ecdh-sha2-" | 44 | #define KEX_ECDH_SHA2_NISTP384 "ecdh-sha2-nistp384" |
45 | #define KEX_ECDH_SHA2_NISTP521 "ecdh-sha2-nistp521" | ||
45 | 46 | ||
46 | #define COMP_NONE 0 | 47 | #define COMP_NONE 0 |
47 | #define COMP_ZLIB 1 | 48 | #define COMP_ZLIB 1 |
@@ -86,7 +87,7 @@ typedef struct Newkeys Newkeys; | |||
86 | 87 | ||
87 | struct Enc { | 88 | struct Enc { |
88 | char *name; | 89 | char *name; |
89 | Cipher *cipher; | 90 | const Cipher *cipher; |
90 | int enabled; | 91 | int enabled; |
91 | u_int key_len; | 92 | u_int key_len; |
92 | u_int iv_len; | 93 | u_int iv_len; |
@@ -131,6 +132,7 @@ struct Kex { | |||
131 | sig_atomic_t done; | 132 | sig_atomic_t done; |
132 | int flags; | 133 | int flags; |
133 | const EVP_MD *evp_md; | 134 | const EVP_MD *evp_md; |
135 | int ec_nid; | ||
134 | char *client_version_string; | 136 | char *client_version_string; |
135 | char *server_version_string; | 137 | char *server_version_string; |
136 | int (*verify_host_key)(Key *); | 138 | int (*verify_host_key)(Key *); |
@@ -141,6 +143,7 @@ struct Kex { | |||
141 | }; | 143 | }; |
142 | 144 | ||
143 | int kex_names_valid(const char *); | 145 | int kex_names_valid(const char *); |
146 | char *kex_alg_list(void); | ||
144 | 147 | ||
145 | Kex *kex_setup(char *[PROPOSAL_MAX]); | 148 | Kex *kex_setup(char *[PROPOSAL_MAX]); |
146 | void kex_finish(Kex *); | 149 | void kex_finish(Kex *); |
@@ -170,11 +173,6 @@ void | |||
170 | kex_ecdh_hash(const EVP_MD *, const EC_GROUP *, char *, char *, char *, int, | 173 | kex_ecdh_hash(const EVP_MD *, const EC_GROUP *, char *, char *, char *, int, |
171 | char *, int, u_char *, int, const EC_POINT *, const EC_POINT *, | 174 | char *, int, u_char *, int, const EC_POINT *, const EC_POINT *, |
172 | const BIGNUM *, u_char **, u_int *); | 175 | const BIGNUM *, u_char **, u_int *); |
173 | int kex_ecdh_name_to_nid(const char *); | ||
174 | const EVP_MD *kex_ecdh_name_to_evpmd(const char *); | ||
175 | #else | ||
176 | # define kex_ecdh_name_to_nid(x) (-1) | ||
177 | # define kex_ecdh_name_to_evpmd(x) (NULL) | ||
178 | #endif | 176 | #endif |
179 | 177 | ||
180 | void | 178 | void |