Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception raised when tls_verify is False #40

Open
sivachandran opened this issue May 10, 2022 · 0 comments · May be fixed by #39
Open

Exception raised when tls_verify is False #40

sivachandran opened this issue May 10, 2022 · 0 comments · May be fixed by #39

Comments

@sivachandran
Copy link

Setting tls_verify to False triggers the following exception

...
File ".../lib/python3.8/site-packages/rfc5424logging/handler.py", line 229, in __init__
    self._setup_transport()
  File ".../lib/python3.8/site-packages/rfc5424logging/handler.py", line 239, in _setup_transport
    self.transport = transport.TLSSocketTransport(
  File ".../lib/python3.8/site-packages/rfc5424logging/transport.py", line 86, in __init__
    super(TLSSocketTransport, self).__init__(address, timeout, framing=framing)
  File ".../lib/python3.8/site-packages/rfc5424logging/transport.py", line 26, in __init__
    self.open()
  File ".../lib/python3.8/site-packages/rfc5424logging/transport.py", line 94, in open
    context.verify_mode = ssl.CERT_REQUIRED if self.tls_verify else ssl.CERT_NONE
  File "/usr/lib/python3.8/ssl.py", line 720, in verify_mode
    super(SSLContext, SSLContext).verify_mode.__set__(self, value)
ValueError: Cannot set verify_mode to CERT_NONE when check_hostname is enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant