extensions/extb_ssl.c: port e0f1c3b5bc & 5572f43834

Reported-by: Opal Hart <opal@wowana.me>
This commit is contained in:
Aaron Jones 2020-01-28 20:37:39 +00:00
parent 155ecb7a7a
commit e0a8d121fa
No known key found for this signature in database
GPG key ID: 50C25BA590AE7AB4

View file

@ -33,7 +33,18 @@ static int eb_ssl(const char *data, struct Client *client_p,
(void)chptr; (void)chptr;
(void)mode_type; (void)mode_type;
if (! IsSSLClient(client_p))
return EXTBAN_NOMATCH;
if (data != NULL) if (data != NULL)
return EXTBAN_INVALID; {
return IsSSLClient(client_p) ? EXTBAN_MATCH : EXTBAN_NOMATCH; if (EmptyString(client_p->certfp))
return EXTBAN_NOMATCH;
if (strcmp(data, client_p->certfp) != 0)
return EXTBAN_NOMATCH;
}
return EXTBAN_MATCH;
} }