Skip to content

Commit b8df7b0

Browse files
committed
gnutls: Fix bug that commonName is always empty
1 parent 388d1ca commit b8df7b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/LibgnutlsTLSSession.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,9 @@ int GnuTLSSession::tlsConnect(const std::string& hostname, TLSVersion& version,
341341
commonName.assign(altName, altNameLen);
342342
}
343343
}
344+
else {
345+
commonName.assign(altName, altNameLen);
346+
}
344347
}
345348
}
346349
if (!net::verifyHostname(hostname, dnsNames, ipAddrs, commonName)) {

0 commit comments

Comments
 (0)