Skip to content

Commit d419e42

Browse files
mistrMichal Strnad
andauthored
Fix server-side mTLS client certificate hostname validation (#397)
Co-authored-by: Michal Strnad <michal.strnad@nic.cz>
1 parent d56d226 commit d419e42

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

trantor/net/inner/tlsprovider/OpenSSLProvider.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,10 @@ struct OpenSSLProvider : public TLSProvider, public NonCopyable
671671
cert,
672672
policyPtr_->getHostname(),
673673
policyPtr_->getAllowBrokenChain(),
674-
contextPtr_->isServer);
674+
!contextPtr_
675+
->isServer); // From the server's point of view,
676+
// the client certificate is verified
677+
// and vice versa
675678
if (!valid)
676679
{
677680
LOG_TRACE

0 commit comments

Comments
 (0)