silc-client: show successful client public key verification
authorPekka Riikonen <priikone@silcnet.org>
Sat, 10 May 2014 11:54:19 +0000 (14:54 +0300)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 10 May 2014 11:54:19 +0000 (14:54 +0300)
When successfully verified client's public key, which now most of the
time happens when sending private message for the first time, show it
on the screen so user can be sure of it.

apps/irssi/src/silc/core/client_ops.c

index 99db2f5b74e6fb18a071f92739d62fd72867d32a..af27ee566bbeb742553e1f7c9ed5647a0260c8cd 100644 (file)
@@ -2757,6 +2757,21 @@ silc_verify_public_key_internal(SilcClient client, SilcClientConnection conn,
       return;
     }
 
+    if (conn_type == SILC_CONN_CLIENT)
+      printformat_module("fe-common/silc", NULL, NULL,
+                        MSGLEVEL_CRAP, SILCTXT_PUBKEY_VERIFIED_CLIENT,
+                        (name
+                         ? name
+                         : (silc_pubkey->identifier.realname
+                            ? silc_pubkey->identifier.realname
+                            : (silc_pubkey->identifier.email
+                               ? silc_pubkey->identifier.email
+                               : ""))),
+                        silc_pubkey->identifier.realname ?
+                        silc_pubkey->identifier.realname : "",
+                        silc_pubkey->identifier.email ?
+                        silc_pubkey->identifier.email : "");
+
     /* Local copy matched */
     if (completion)
       completion(TRUE, context);