silcd: show MAC in welcome notifys
authorPekka Riikonen <priikone@silcnet.org>
Mon, 28 Apr 2014 20:00:55 +0000 (23:00 +0300)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 28 Apr 2014 20:00:55 +0000 (23:00 +0300)
Shoe cipher and MAC currently in use in the welcome messages servers sends
to client.

apps/silcd/server.c
apps/silcd/server_util.c

index 4712bb2d05b60621f4ff13917ad6905028e1070a..7441676badf3b5a682216013e2ee71e024be76fa 100644 (file)
@@ -1749,7 +1749,7 @@ void silc_server_start_key_exchange(SilcServerConnection sconn)
   SilcServer server = sconn->server;
   SilcServerConfigRouter *conn = sconn->conn.ref_ptr;
   SilcUnknownEntry entry;
-  SilcSKEParamsStruct params;
+  SilcSKEParamsStruct params = {};
   SilcSKE ske;
 
   /* Cancel any possible retry timeouts */
index c48e9a5474ebff44629385a02745eec9ca3070b8..233299570b5b537545f4f5e1d8bf791f158a7b4f 100644 (file)
@@ -1426,6 +1426,7 @@ void silc_server_send_connect_notifys(SilcServer server,
                                      SilcClientEntry client)
 {
   SilcCipher key;
+  SilcHmac hmac;
 
   SILC_LOG_DEBUG(("Send welcome notifys"));
 
@@ -1486,12 +1487,12 @@ void silc_server_send_connect_notifys(SilcServer server,
                             server->stat.my_router_ops +
                             server->stat.my_server_ops));
 
-  silc_packet_get_keys(sock, &key, NULL, NULL, NULL);
+  silc_packet_get_keys(sock, &key, NULL, &hmac, NULL);
   SILC_SERVER_SEND_NOTIFY(server, sock, SILC_NOTIFY_TYPE_NONE,
-                         ("Your connection is secured with %s cipher, "
-                          "key length %d bits",
+                         ("Your connection is secured with %s cipher "
+                          "and %s MAC",
                           silc_cipher_get_name(key),
-                          silc_cipher_get_key_len(key)));
+                          silc_hmac_get_name(hmac)));
   SILC_SERVER_SEND_NOTIFY(server, sock, SILC_NOTIFY_TYPE_NONE,
                          ("Your current nickname is %s",
                           client->nickname));