Locust: OpenSSL errors when testing HTTPS

Created on 25 Jun 2015  ·  2Comments  ·  Source: locustio/locust

Hi,

I'm running Locust 0.7.3 on Mac OS X using OpenSSL version OpenSSL 1.0.2c 12 Jun 2015 and Python version 2.7.10.

When running against HTTPS sites I get the following error:

GET /: "SSLError(SSLError(SSLError('bad handshake', Error([('SSL routines', 'SSL23_GET_SERVER_HELLO', 'sslv3 alert handshake failure')],)),),)"

I saw another issue regarding SSL being broken. Although it was a completely different scenario and error message, the solution was to use a version of Python < 2.7.9 so I attempted to use Python version 2.6.7 in this case and I still encounter the same issue.

Any help would be appreciated.

Thanks.

Most helpful comment

You can set it while making each request

self.client.post(url, name=name, data=data, verify=False)

or set it once in your on_start() method as below

def on_start(self):
    self.client.verify = False

More info can be found here
http://docs.python-requests.org/en/latest/user/advanced/?highlight=ssl#ssl-cert-verification

All 2 comments

In your client request you should use the option "verify=False".

You can set it while making each request

self.client.post(url, name=name, data=data, verify=False)

or set it once in your on_start() method as below

def on_start(self):
    self.client.verify = False

More info can be found here
http://docs.python-requests.org/en/latest/user/advanced/?highlight=ssl#ssl-cert-verification

Was this page helpful?
0 / 5 - 0 ratings