]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Log the hash used for DH kex (now there's a choice).
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 12 Mar 2006 15:39:19 +0000 (15:39 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 12 Mar 2006 15:39:19 +0000 (15:39 +0000)
[originally from svn r6605]

ssh.c
ssh.h
sshsh256.c
sshsha.c

diff --git a/ssh.c b/ssh.c
index 60ddefccd939f71ceca92aad5ec0d8b00bcae506..ba3dfad6d0a9729c4c66d62d16828d6979d2288b 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -5519,7 +5519,8 @@ static int do_ssh2_transport(Ssh ssh, void *vin, int inlen,
                  ssh->kex->groupname);
     }
 
-    logevent("Doing Diffie-Hellman key exchange");
+    logeventf(ssh, "Doing Diffie-Hellman key exchange with hash %s",
+             ssh->kex->hash->text_name);
     /*
      * Now generate and send e for Diffie-Hellman.
      */
diff --git a/ssh.h b/ssh.h
index d0543cd9ef5cef30bdcad50754ee4ac1989339cf..cca3ec07ca915f8a68466e292e8ed5e65a944979 100644 (file)
--- a/ssh.h
+++ b/ssh.h
@@ -190,6 +190,7 @@ struct ssh_hash {
     void (*bytes)(void *, void *, int);
     void (*final)(void *, unsigned char *); /* also frees context */
     int hlen; /* output length in bytes */
+    char *text_name;
 };   
 
 struct ssh_kex {
index 70c2d7d3dec76f25c318d7a8fe82be8414f1b7f3..ce6979ea72fa1f945a9a3c155ed9f1fe1177c5fd 100644 (file)
@@ -215,7 +215,7 @@ static void sha256_final(void *handle, unsigned char *output)
 }
 
 const struct ssh_hash ssh_sha256 = {
-    sha256_init, sha256_bytes, sha256_final, 32
+    sha256_init, sha256_bytes, sha256_final, 32, "SHA-256"
 };
 
 #ifdef TEST
index b3860b69560ac17dc76f28f44900c5f5caa09f3c..1db5c26dd5d9373b2fdf93f854ba938b40e47348 100644 (file)
--- a/sshsha.c
+++ b/sshsha.c
@@ -217,7 +217,7 @@ static void sha1_final(void *handle, unsigned char *output)
 }
 
 const struct ssh_hash ssh_sha1 = {
-    sha1_init, sha1_bytes, sha1_final, 20
+    sha1_init, sha1_bytes, sha1_final, 20, "SHA-1"
 };
 
 /* ----------------------------------------------------------------------