From: Thierry Parmentelat Date: Wed, 27 Mar 2019 16:00:53 +0000 (+0100) Subject: a PlShell object, when plc_direct_access is False, is now created with SSL verificati... X-Git-Tag: sfa-4.0.3~2 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=9de8e0494e18f04cca120755d19f0b724d9d65c9 a PlShell object, when plc_direct_access is False, is now created with SSL verification turned off --- diff --git a/sfa/planetlab/plshell.py b/sfa/planetlab/plshell.py index a85157f7..f544f7a7 100644 --- a/sfa/planetlab/plshell.py +++ b/sfa/planetlab/plshell.py @@ -89,7 +89,12 @@ class PlShell: 'Username': str(config.SFA_PLC_USER), 'AuthString': str(config.SFA_PLC_PASSWORD), } - self.proxy = xmlrpclib.Server(url, verbose=False, allow_none=True) + # minimal verification for backwards compat + import ssl + ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS) + ssl_context.verify_mode = ssl.CERT_NONE + self.proxy = xmlrpclib.ServerProxy( + url, verbose=False, allow_none=True, context=ssl_context) def __getattr__(self, name): def func(*args, **kwds):