Python requests - how to add multiple own certificates

前端 未结 1 611
你的背包
你的背包 2020-12-21 02:05

Is there a way to tell the requests lib to add multiple certificates like all .pem files from a specified folder?

import requests, glob
CERTIFICATES = glob(\         


        
相关标签:
1条回答
  • 2020-12-21 02:36

    You can only pass in one certificate file at a time.

    Either merge those files into one .pem file, or loop over the certificate files and try each one in turn until the connection succeeds.

    A .pem file can hold multiple certificates; it should be safe to concatenate all your files together. See http://how2ssl.com/articles/working_with_pem_files/.

    0 讨论(0)
提交回复
热议问题