Drop hostlen from X509_VERIFY_PARAM_ID.
Just store NUL-terminated strings. This works better when we add support for multiple hostnames.
This commit is contained in:
@@ -972,6 +972,10 @@ static int do_x509_check(X509 *x, const unsigned char *chk, size_t chklen,
|
||||
int X509_check_host(X509 *x, const unsigned char *chk, size_t chklen,
|
||||
unsigned int flags)
|
||||
{
|
||||
if (chklen == 0)
|
||||
chklen = chk ? strlen((char *)chk) : 0;
|
||||
else if (chk && memchr(chk, '\0', chklen))
|
||||
return 0;
|
||||
return do_x509_check(x, chk, chklen, flags, GEN_DNS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user