gnutls: Fix bug that commonName is always empty

pull/1214/head
Tatsuhiro Tsujikawa 2018-06-05 21:27:45 +09:00
parent 388d1ca330
commit b8df7b0880
1 changed files with 3 additions and 0 deletions

View File

@ -341,6 +341,9 @@ int GnuTLSSession::tlsConnect(const std::string& hostname, TLSVersion& version,
commonName.assign(altName, altNameLen);
}
}
else {
commonName.assign(altName, altNameLen);
}
}
}
if (!net::verifyHostname(hostname, dnsNames, ipAddrs, commonName)) {