Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix utils.authenticators import on platforms without ssl #451

Merged
merged 1 commit into from
Jul 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions rpyc/utils/authenticators.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class SSLAuthenticator(object):
"""

def __init__(self, keyfile, certfile, ca_certs=None, cert_reqs=None,
ssl_version=ssl.PROTOCOL_TLS, ciphers=None):
ssl_version=None, ciphers=None):
self.keyfile = str(keyfile)
self.certfile = str(certfile)
self.ca_certs = str(ca_certs) if ca_certs else None
Expand All @@ -70,7 +70,10 @@ def __init__(self, keyfile, certfile, ca_certs=None, cert_reqs=None,
self.cert_reqs = ssl.CERT_NONE
else:
self.cert_reqs = cert_reqs
self.ssl_version = ssl_version
if ssl_version is None:
self.ssl_version = ssl.PROTOCOL_TLS
else:
self.ssl_version = ssl_version

def __call__(self, sock):
kwargs = dict(keyfile=self.keyfile, certfile=self.certfile,
Expand Down