Skip to content

Commit 7287e0a

Browse files
committed
fix: disable checking hostname when tls verify is false
jobec#39
1 parent ae70baa commit 7287e0a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rfc5424logging/transport.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ def open(self):
9090
context = ssl.create_default_context(
9191
purpose=ssl.Purpose.SERVER_AUTH, cafile=self.tls_ca_bundle
9292
)
93+
# copied from https://github.com/jobec/rfc5424-logging-handler/pull/39
94+
# if/when this PR gets merged we should use the pypi provided rfc5424-logging-handler package
95+
context.check_hostname = self.tls_verify
9396
context.verify_mode = ssl.CERT_REQUIRED if self.tls_verify else ssl.CERT_NONE
9497
server_hostname, _ = self.address
9598
if self.tls_client_cert:

0 commit comments

Comments
 (0)