From 946522ba8055589b3eb47e925c66544c115a1673 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Wed, 13 Aug 2014 19:22:43 +0200 Subject: kike: go with shorter SHA1 fingerprints --- kike.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'kike.c') diff --git a/kike.c b/kike.c index cd2abc0..39b824a 100644 --- a/kike.c +++ b/kike.c @@ -277,7 +277,7 @@ irc_is_valid_user_mask (const char *mask) static bool irc_is_valid_fingerprint (const char *fp) { - return irc_regex_match ("^[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){19}$", fp); + return irc_regex_match ("^[a-fA-F0-9]{40}$", fp); } // --- Clients (equals users) -------------------------------------------------- @@ -841,9 +841,8 @@ client_get_ssl_cert_fingerprint (struct client *c) struct str fingerprint; str_init (&fingerprint); - str_append_printf (&fingerprint, "%02X", hash[0]); - for (size_t i = 1; i < sizeof hash; i++) - str_append_printf (&fingerprint, ":%02X", hash[i]); + for (size_t i = 0; i < sizeof hash; i++) + str_append_printf (&fingerprint, "%02x", hash[i]); return str_steal (&fingerprint); } -- cgit v1.2.3-54-g00ecf