python - CERTIFICATE_VERIFY_FAILED error during mutual authentication -


i'm using mutual authentication , python2. generate certificates server , client use form:

openssl -newkey rsa:2048 -keyout server.key -out server.crt req -x509 -nodes -days 365

i wrap sockets this:

ssl.wrap_socket(s, ssl_version=ssl.protocol_tlsv1, cert_reqs=ssl.cert_required, keyfile=keyfile, certfile=certfile) 

and following error occurs running connect on socket on client side:

file "/usr/lib/python2.7/ssl.py", line 844, in connect self._real_connect(addr, false) file "/usr/lib/python2.7/ssl.py", line 835, in _real_connect self.do_handshake() file "/usr/lib/python2.7/ssl.py", line 808, in do_handshake self._sslobj.do_handshake() ssl.sslerror: [ssl: certificate_verify_failed] certificate verify failed (_ssl.c:590) 

i read somewhere may incompatibility between certificates , version of python, not sure. can provide exact version of python 2 (i think python 2.7) , openssl when i'm on main computer.

any figuring out appreciated.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -