Forums

TLS/SSL Issues

Hi I need some help, my code is working 100% fine locally, but not on PA

  File "/usr/local/lib/python3.10/imaplib.py", line 202, in __init__
    self.open(host, port, timeout)
  File "/home/redacted/projectname/api/tasks.py", line 109, in open
    super().open(host, port)
  File "/usr/local/lib/python3.10/imaplib.py", line 312, in open
    self.sock = self._create_socket(timeout)
  File "/home/redacted/projectname/api/tasks.py", line 106, in _create_socket
    return self.ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997)

What is the server that you're trying to connect to? If it's something you need to keep private, you can send us a message with the details using the "Send feedback" link at the top of the page.