1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-07 02:23:12 +02:00

broadcast cert fingerprint on connect

This commit is contained in:
Bram Matthys
2015-05-18 17:01:04 +02:00
parent e8888bae53
commit 222c780d64
+9
View File
@@ -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;
}