From 222c780d64382f5641fe3df19cd2527c68be30ff Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 18 May 2015 17:01:04 +0200 Subject: [PATCH] broadcast cert fingerprint on connect --- src/modules/certfp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/certfp.c b/src/modules/certfp.c index 440a971d4..0d0c20551 100644 --- a/src/modules/certfp.c +++ b/src/modules/certfp.c @@ -98,6 +98,13 @@ char *get_fingerprint_for_client(aClient *cptr) return NULL; } +void certfp_broadcast(aClient *acptr, char *fp) +{ + /* Hmm.. we shouldn't have to do this ourselves.. */ + sendto_server(NULL, 0, 0, ":%s MD %s %s %s :%s", + me.name, "client", acptr->name, "certfp", fp); +} + int certfp_connect(aClient *acptr) { if (IsSecure(acptr)) @@ -107,7 +114,9 @@ int certfp_connect(aClient *acptr) sendnotice(acptr, "*** Your SSL fingerprint is %s", fp); + /* Set & broadcast */ certfp_unserialize(fp, data); + certfp_broadcast(acptr, fp); } return 0; }