Skip to content

Tag: ssl

Why is `server_hostname` required for an SSL-wrapped socket?

I’m writing some Python code that needs to communicate with a remote host via a TLS connection. I set up an SSL context like this: Then, I connected to domain d over port p like this: I was met with a protocol violation on an unexpected EOF. The fix was to create the socket like this: As I know next

SSL connect to mysql from django

We just had a migration from a “unsecured” mysql DB to a SSL mysql but my Django application cannot connect anymore. content of settings.py and when I execute this Django command line : python3 manage.py dbshell (which used to work with the pre-migration DB), I receive the error message : As you c…

Python requests trust certificate in cer-file

I got such certificate : certificate.base64.cer And I want to send request using it api.py but I get How to fix that? What is wrong? Answer Python requests trust certificate in cer-file session.cert is used for authentication using client certificates. For specifying the trusted CA session.verify must be used…