The hostname in the certificate is checked already a few lines above by calling gnutls_x509_crt_check_hostname(). No need to check it here again.
This also fixes the bad hostname validation in cases where the used server name is only available in the SubjectAltName extension of the certificate, and not in its Distinguished Name (DN).
Remove duplicate hostname check
The hostname in the certificate is checked already a few lines above by calling
gnutls_x509_crt_check_hostname(). No need to check it here again.
This also fixes the bad hostname validation in cases where the used server name
is only available in the SubjectAltName extension of the certificate, and not
in its Distinguished Name (DN).
Fixes #295.