jadolg / rocketchat_API

Python API wrapper for Rocket.Chat
MIT License
268 stars 93 forks source link

ssl vcertification error #206

Open Shraddha10rathor opened 1 year ago

Shraddha10rathor commented 1 year ago

hi i had created the one docker container from which i am trying to connect to my rocketchat domain, where i am getting the ssl certification error. rocket = RocketChat('shraddha_rathor@demo.com, '****', server_url='https://rocketchat.demo.com') Traceback (most recent call last):   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen     httplib_response = self._make_request(                        ^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 386, in _make_request     self._validate_conn(conn)   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn     conn.connect()   File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 419, in connect     self.sock = ssl_wrapsocket(                 ^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.11/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket     ssl_sock = _ssl_wrap_socketimpl(                ^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.11/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl     return ssl_context.wrap_socket(sock, server_hostname=server_hostname)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.11/ssl.py", line 517, in wrap_socket     return self.sslsocket_class._create(            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.11/ssl.py", line 1075, in _create     self.do_handshake()   File "/usr/local/lib/python3.11/ssl.py", line 1346, in do_handshake     self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)

jadolg commented 1 year ago

Well, this looks like a regular SSL error. Does your server have a valid certificate?

VergeDX commented 1 month ago

Set ssl_verify=False in RocketChat constructor.