summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kike.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kike.c b/src/kike.c
index 3202333..dde8d42 100644
--- a/src/kike.c
+++ b/src/kike.c
@@ -227,7 +227,7 @@ irc_is_valid_key (const char *key)
static bool
irc_is_valid_fingerprint (const char *fp)
{
- return irc_regex_match ("^[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){20}$", fp);
+ return irc_regex_match ("^[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){19}$", fp);
}
// --- Application data --------------------------------------------------------
@@ -798,7 +798,7 @@ 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 = 0; i < sizeof hash; i++)
+ for (size_t i = 1; i < sizeof hash; i++)
str_append_printf (&fingerprint, ":%02X", hash[i]);
return str_steal (&fingerprint);
}