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

211 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 answers

0
Saikrishna Radarapu 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.