]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Make log messages look slightly nicer.
authorSimon Tatham <anakin@pobox.com>
Sun, 7 Jun 2015 11:46:33 +0000 (12:46 +0100)
committerSimon Tatham <anakin@pobox.com>
Sun, 7 Jun 2015 12:50:05 +0000 (13:50 +0100)
I'd rather see the cipher and MAC named separately, with a hint that
the two are linked together in some way, than see the cipher called by
a name including the MAC and the MAC init message have an ugly
'<implicit>' in it.

ssh.c
sshccp.c

diff --git a/ssh.c b/ssh.c
index d89dfa3845322ca5df278bb8fc4f82a4c2b2cd72..c565059689c531d95b0404c1488a39bcb1161827 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -7139,9 +7139,10 @@ static void do_ssh2_transport(Ssh ssh, const void *vin, int inlen,
 
     logeventf(ssh, "Initialised %.200s client->server encryption",
              ssh->cscipher->text_name);
-    logeventf(ssh, "Initialised %.200s client->server MAC algorithm%s",
+    logeventf(ssh, "Initialised %.200s client->server MAC algorithm%s%s",
              ssh->csmac->text_name,
-              ssh->csmac_etm ? " (in ETM mode)" : "");
+              ssh->csmac_etm ? " (in ETM mode)" : "",
+              ssh->cscipher->required_mac ? " (required by cipher)" : "");
     if (ssh->cscomp->text_name)
        logeventf(ssh, "Initialised %s compression",
                  ssh->cscomp->text_name);
@@ -7206,9 +7207,10 @@ static void do_ssh2_transport(Ssh ssh, const void *vin, int inlen,
     }
     logeventf(ssh, "Initialised %.200s server->client encryption",
              ssh->sccipher->text_name);
-    logeventf(ssh, "Initialised %.200s server->client MAC algorithm%s",
+    logeventf(ssh, "Initialised %.200s server->client MAC algorithm%s%s",
              ssh->scmac->text_name,
-              ssh->scmac_etm ? " (in ETM mode)" : "");
+              ssh->scmac_etm ? " (in ETM mode)" : "",
+              ssh->sccipher->required_mac ? " (required by cipher)" : "");
     if (ssh->sccomp->text_name)
        logeventf(ssh, "Initialised %s decompression",
                  ssh->sccomp->text_name);
index b38d257edab1629c98779eb30aeb89965214aa64..51a714505ac368adfc36b6deadf3aa430435d2b4 100644 (file)
--- a/sshccp.c
+++ b/sshccp.c
@@ -438,7 +438,7 @@ static const struct ssh_mac ssh2_poly1305 = {
     poly_start, poly_bytes, poly_genresult, poly_verresult,
 
     "", "", /* Not selectable individually, just part of ChaCha20-Poly1305 */
-    16, "<implicit>"
+    16, "Poly1305"
 };
 
 static void *ccp_make_context(void)
@@ -527,7 +527,7 @@ static const struct ssh2_cipher ssh2_chacha20_poly1305 = {
     ccp_decrypt_length,
 
     "chacha20-poly1305@openssh.com",
-    1, 512, SSH_CIPHER_SEPARATE_LENGTH, "ChaCha20 Poly1305",
+    1, 512, SSH_CIPHER_SEPARATE_LENGTH, "ChaCha20",
 
     &ssh2_poly1305
 };