GETKEY update client entry fingerprint too.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 6 Dec 2002 16:18:23 +0000 (16:18 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 6 Dec 2002 16:18:23 +0000 (16:18 +0000)
CHANGES
lib/silcclient/command_reply.c

diff --git a/CHANGES b/CHANGES
index 5ea86a4dbe5c6451dfec4a2d8088b1400812a58a..3098057645ea6aa2a7a03060df39b26159aa4138 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,9 @@ Fri Dec  6 17:40:24 EET 2002  Pekka Riikonen <priikone@silcnet.org>
        * Removed backwards support for not-so-strict decryption length
          check, it's strict now.  Affected lib/silccrypt/silccipher.c.
 
+       * GETKEY to update the client entrys fingerprint too.
+         Affected file lib/silcclient/command_reply.c.
+
 Thu Dec  5 22:29:46 EET 2002  Pekka Riikonen <priikone@silcnet.org>
 
        * Fixed backup router bugs:  When backup resumes router and
index d615c14204e31f67138afae054961ae7c7e55b58..940af4441dbc76b57a8a4d4c84c5523508905bce 100644 (file)
@@ -1818,6 +1818,14 @@ SILC_CLIENT_CMD_REPLY_FUNC(getkey)
       goto out;
     }
 
+    /* Save fingerprint */
+    if (!client_entry->fingerprint) {
+      client_entry->fingerprint = silc_calloc(20, sizeof(unsigned char));
+      client_entry->fingerprint_len = 20;
+      silc_hash_make(cmd->client->sha1hash, tmp + 4, len - 4,
+                    client_entry->fingerprint);
+    }
+
     /* Notify application */
     COMMAND_REPLY((SILC_ARGS, id_type, client_entry, public_key));
   } else if (id_type == SILC_ID_SERVER) {