From 7e256eea6d34ae35ff93407eee28e8d6a3d34d61 Mon Sep 17 00:00:00 2001 From: Lars Holmberg Date: Thu, 19 Dec 2024 10:07:39 +0100 Subject: [PATCH] FastHttpUser: Fix ssl loading performance issue by avoiding to load certs when they wont be used anyway. --- locust/contrib/fasthttp.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/locust/contrib/fasthttp.py b/locust/contrib/fasthttp.py index 555a38173d..9c0f7a9a31 100644 --- a/locust/contrib/fasthttp.py +++ b/locust/contrib/fasthttp.py @@ -96,10 +96,7 @@ def _construct_basic_auth_str(username, password): def insecure_ssl_context_factory(): - context = gevent.ssl.create_default_context() - context.check_hostname = False - context.verify_mode = gevent.ssl.CERT_NONE - return context + return gevent.ssl._create_unverified_context() class FastHttpSession: