1

I am trying to write a tool to generate a lot of requests from Python. The requests require a certificate to be attached to each request.

Meaning I am doing something like:

requests.post('/path/',
    cert=('cert.pem', 'private.key'))
       verify=False)

How can I make sure the certificate is read from memory instead of the file each time? Because I suspect this is slowing things down.

For generating the load I am using grequests.

mrdvlpr
  • 526
  • 4
  • 20
  • Problably no, if the [observations here still persist](http://stackoverflow.com/questions/36353087/python-requests-load-ssl-certificate-from-database). – dhke Apr 21 '17 at 18:10
  • that's just sad... – mrdvlpr Apr 21 '17 at 18:19
  • 1
    A more definitive answer: That's [not supported](https://github.com/kennethreitz/requests/blob/342096a3b98e9c4466316167574dbf5054f30daa/requests/adapters.py#L244). Probably because `urllib3`'s `HTTPSConnectionPool`also only supports a `cert_file` argument. – dhke Apr 21 '17 at 18:29

0 Answers0