How to send a HTTP request with client certificate + private key + password/secret in Python 3
When we need to create a HTTP client that communicates with a HTTP server through certificate-based authentication, we will typically have to download a certificate, in
.pem format, from the server.
After we had downloaded the
.pem file, the HTTP client will use the private key and certificate to authenticate itself with the HTTP server. Sometimes, the HTTP client will need to decrypt the private key with a password/secret first.
So with a
.pem file and a password/secret, how can you create a HTTP client in Python 3 to send a HTTP request to the HTTP server?
In case you need it, this post shows how to send a HTTP request with client certificate + private key + password/secret in Python 3.