From eaa67a100d54c64eec7328ffbd051ab539ff7c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Thu, 18 Jan 2018 16:12:07 +0100 Subject: [PATCH] use_ssl flag is set by Connection This wasn't an issue before as scheme=https was not documented but now it is in the docs and it makes this entire block be skipped if url is given without scheme and no ssl_context is passed completely breaking ssl --- elasticsearch/connection/http_urllib3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/connection/http_urllib3.py b/elasticsearch/connection/http_urllib3.py index e2ae166d..163ff0cc 100644 --- a/elasticsearch/connection/http_urllib3.py +++ b/elasticsearch/connection/http_urllib3.py @@ -84,7 +84,7 @@ class Urllib3HttpConnection(Connection): raise ImproperlyConfigured("When using `ssl_context`, `use_ssl`, `verify_certs`, `ca_certs` and `ssl_version` are not permitted") # if ssl_context provided use SSL by default - if use_ssl or ssl_context: + if self.use_ssl or ssl_context: ca_certs = CA_CERTS if ca_certs is None else ca_certs if not ca_certs and not ssl_context and verify_certs: