1

I have two certificates that I need to use for a request in python.

I believe the syntax is like this: r=requests.get('https://uat.xyz.com/xx', cert='1.cer')

But in my case there are two certificates that are needed. I tried to put them into a folder and did: r=requests.get('https://uat.xyz.com/xx', verify='/certificates')

but that didn't work either.

Any suggestions what I can do to include multiple certificates?

Nickpick
  • 6,163
  • 16
  • 65
  • 116
  • SSL/TLS does not support two leaf certificates for the same connection. Or is this a leaf certificate and an intermediate certificate (to build the trust chain)? – Steffen Ullrich Apr 08 '16 at 14:28

1 Answers1

-1

maybe its not the best solution, but you can ignore certificates:

 r=requests.get('https://uat.xyz.com/xx', verify=False)

after this script will throw warning(s) but it works

2nd solution with pem file:

Python requests - how to add multiple own certificates

r = requests.get('https://uat.xyz.com/xx', verify='/path/to/cetificate.pem')
Community
  • 1
  • 1
János Farkas
  • 453
  • 5
  • 14