load certificate with password
Readded because the last commit removed this.
This commit is contained in:
committed by
Sergey Petrov
parent
ae835a195f
commit
7783520dc3
@@ -31,9 +31,9 @@ class Credentials(object):
|
||||
|
||||
# Credentials subclass for certificate authentication
|
||||
class CertificateCredentials(Credentials):
|
||||
def __init__(self, cert_file):
|
||||
def __init__(self, cert_file, password=None):
|
||||
ssl_context = init_context()
|
||||
ssl_context.load_cert_chain(cert_file)
|
||||
ssl_context.load_cert_chain(cert_file, password=password)
|
||||
super(CertificateCredentials, self).__init__(ssl_context)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user