From e29f719bd709601550dd93296bd49df08b1c4ad4 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Fri, 9 Jul 2021 14:22:54 -0400 Subject: [PATCH] Allow a password to be passed --- pydruid/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pydruid/client.py b/pydruid/client.py index 3b6e8792..d10bd550 100755 --- a/pydruid/client.py +++ b/pydruid/client.py @@ -44,9 +44,9 @@ def set_proxies(self, proxies): opener = urllib.request.build_opener(proxy_support) urllib.request.install_opener(opener) - def set_cert_chain(self, cert, keyfile): + def set_cert_chain(self, certfile, keyfile=None, password=None): context = ssl.create_default_context() - context.load_cert_chain(cert, keyfile) + context.load_cert_chain(certfile, keyfile, password) handler = urllib.request.HTTPSHandler(context=context) urllib.request.install_opener(handler)