silc-client: target public key verification better
authorPekka Riikonen <priikone@silcnet.org>
Sat, 10 May 2014 14:15:55 +0000 (17:15 +0300)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 10 May 2014 14:15:55 +0000 (17:15 +0300)
Use the context set by library to show the actual nickname of the client
whose public key we are verifying.

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

index a87eff9f02c1cbc9ff2d074599f1dfa582a81d45..9ad989e29ff80b58638ffe5fa24b6c2b78cf0f93 100644 (file)
@@ -2572,6 +2572,9 @@ silc_verify_public_key_internal(SilcClient client, SilcClientConnection conn,
   fingerprint = silc_hash_fingerprint(NULL, pk, pk_len);
   babbleprint = silc_hash_babbleprint(NULL, pk, pk_len);
 
+  if (!name && conn->context_type == SILC_ID_CLIENT)
+    name = conn->client_entry->nickname;
+
   verify = silc_calloc(1, sizeof(*verify));
   verify->client = client;
   verify->conn = conn;