summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/kex.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/kex.h')
-rw-r--r--usr.bin/ssh/kex.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/usr.bin/ssh/kex.h b/usr.bin/ssh/kex.h
index 93a529e125b..52d442e9a7d 100644
--- a/usr.bin/ssh/kex.h
+++ b/usr.bin/ssh/kex.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.h,v 1.32 2002/09/09 14:54:14 markus Exp $ */
+/* $OpenBSD: kex.h,v 1.33 2003/02/16 17:09:57 markus Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -55,8 +55,9 @@ enum kex_modes {
};
enum kex_exchange {
- DH_GRP1_SHA1,
- DH_GEX_SHA1
+ KEX_DH_GRP1_SHA1,
+ KEX_DH_GEX_SHA1,
+ KEX_MAX
};
#define KEX_INIT_SENT 0x0001
@@ -112,6 +113,7 @@ struct Kex {
int (*verify_host_key)(Key *);
Key *(*load_host_key)(int);
int (*host_key_index)(Key *);
+ void (*kex[KEX_MAX])(Kex *);
};
Kex *kex_setup(char *[PROPOSAL_MAX]);
@@ -121,11 +123,20 @@ void kex_send_kexinit(Kex *);
void kex_input_kexinit(int, u_int32_t, void *);
void kex_derive_keys(Kex *, u_char *, BIGNUM *);
-void kexdh(Kex *);
-void kexgex(Kex *);
-
Newkeys *kex_get_newkeys(int);
+void kexdh_client(Kex *);
+void kexdh_server(Kex *);
+void kexgex_client(Kex *);
+void kexgex_server(Kex *);
+
+u_char *
+kex_dh_hash(char *, char *, char *, int, char *, int, u_char *, int,
+ BIGNUM *, BIGNUM *, BIGNUM *);
+u_char *
+kexgex_hash(char *, char *, char *, int, char *, int, u_char *, int,
+ int, int, int, BIGNUM *, BIGNUM *, BIGNUM *, BIGNUM *, BIGNUM *);
+
#if defined(DEBUG_KEX) || defined(DEBUG_KEXDH)
void dump_digest(char *, u_char *, int);
#endif