projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce a new utility function smemclr(), which memsets things to
[u/mdw/putty]
/
sshdh.c
diff --git
a/sshdh.c
b/sshdh.c
index
8d98462
..
c733b61
100644
(file)
--- a/
sshdh.c
+++ b/
sshdh.c
@@
-1,3
+1,7
@@
+/*
+ * Diffie-Hellman implementation for PuTTY.
+ */
+
#include "ssh.h"
/*
#include "ssh.h"
/*
@@
-48,7
+52,7
@@
static const unsigned char G[] = { 2 };
static const struct ssh_kex ssh_diffiehellman_group1_sha1 = {
"diffie-hellman-group1-sha1", "group1",
static const struct ssh_kex ssh_diffiehellman_group1_sha1 = {
"diffie-hellman-group1-sha1", "group1",
- P1, G, lenof(P1), lenof(G), &ssh_sha1
+
KEXTYPE_DH,
P1, G, lenof(P1), lenof(G), &ssh_sha1
};
static const struct ssh_kex *const group1_list[] = {
};
static const struct ssh_kex *const group1_list[] = {
@@
-62,7
+66,7
@@
const struct ssh_kexes ssh_diffiehellman_group1 = {
static const struct ssh_kex ssh_diffiehellman_group14_sha1 = {
"diffie-hellman-group14-sha1", "group14",
static const struct ssh_kex ssh_diffiehellman_group14_sha1 = {
"diffie-hellman-group14-sha1", "group14",
- P14, G, lenof(P14), lenof(G), &ssh_sha1
+
KEXTYPE_DH,
P14, G, lenof(P14), lenof(G), &ssh_sha1
};
static const struct ssh_kex *const group14_list[] = {
};
static const struct ssh_kex *const group14_list[] = {
@@
-74,12
+78,18
@@
const struct ssh_kexes ssh_diffiehellman_group14 = {
group14_list
};
group14_list
};
+static const struct ssh_kex ssh_diffiehellman_gex_sha256 = {
+ "diffie-hellman-group-exchange-sha256", NULL,
+ KEXTYPE_DH, NULL, NULL, 0, 0, &ssh_sha256
+};
+
static const struct ssh_kex ssh_diffiehellman_gex_sha1 = {
"diffie-hellman-group-exchange-sha1", NULL,
static const struct ssh_kex ssh_diffiehellman_gex_sha1 = {
"diffie-hellman-group-exchange-sha1", NULL,
- NULL, NULL, 0, 0, &ssh_sha1
+
KEXTYPE_DH,
NULL, NULL, 0, 0, &ssh_sha1
};
static const struct ssh_kex *const gex_list[] = {
};
static const struct ssh_kex *const gex_list[] = {
+ &ssh_diffiehellman_gex_sha256,
&ssh_diffiehellman_gex_sha1
};
&ssh_diffiehellman_gex_sha1
};