Skip to content

Commit

Permalink
Allow a password to be passed
Browse files Browse the repository at this point in the history
  • Loading branch information
xaptronic committed Jul 9, 2021
1 parent b7c269a commit e29f719
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pydruid/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit e29f719

Please sign in to comment.