From 9d5259ff9878b24805bf605fa26be24a99e2bbd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Thu, 12 Nov 2026 17:01:24 +0100 Subject: [PATCH] Fix for --auth-file (PKI) failing on self-signed/internal CA certificates --- lib/core/settings.py | 2 +- lib/request/pkihandler.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index c089c737e..02cab700b 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.10.11.61" +VERSION = "1.10.11.62" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/request/pkihandler.py b/lib/request/pkihandler.py index 5b1c3495e..9961d2cd7 100644 --- a/lib/request/pkihandler.py +++ b/lib/request/pkihandler.py @@ -37,6 +37,9 @@ class HTTPSPKIAuthHandler(_urllib.request.HTTPSHandler): try: if ssl and hasattr(ssl, "SSLContext") and hasattr(ssl, "create_default_context"): ctx = ssl.create_default_context() + # Note: no server certificate validation (e.g. self-signed/internal CA), as everywhere else (e.g. httpshandler.py) + ctx.check_hostname = False + ctx.verify_mode = ssl.CERT_NONE ctx.load_cert_chain(certfile=self.auth_file, keyfile=self.auth_file) try: return _http_client.HTTPSConnection(host, timeout=timeout, context=ctx)