Use ssl certificate of the server instead of root CA certificate while making HTTPS calls using urllib3

227 Views Asked by At

It is given in the documentation of urllib3 that,

In order to enable verification you will need a set of root certificates.

but is there any way to make HTTPS calls by using the SSL certificate of the server itself instead of root certificates.

1

There are 1 best solutions below

0
On

urllib3 has a property of the PoolManager called assert_fingerprint: this property can be initiated with a string that is the hex-encoded digest of the certificate bytes. When used, this will circumvent the regular chain building logic.