def __init__(self, cafile, certfile=None, keyfile=None): SafeTransport.__init__(self) self._ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) self._ssl_context.load_verify_locations(cafile) if certfile: self._ssl_context.load_cert_chain(certfile, keyfile) self._ssl_context.verify_mode = ssl.CERT_REQUIRED
def __init__(self, config, context): TransportMixIn.__init__(self, config, context) try: # Give the context to XMLSafeTransport, to avoid it setting the # context to None. # See https://github.com/tcalmant/jsonrpclib/issues/39 XMLSafeTransport.__init__(self, context=context) except TypeError: # On old versions of Python (Pre-2014), the context argument # wasn't available XMLSafeTransport.__init__(self)
def __init__(self): """ Initialization. EXAMPLES:: sage: from sage.dev.digest_transport import DigestTransport sage: type(DigestTransport()) <class 'sage.dev.digest_transport.DigestTransport'> """ SafeTransport.__init__(self) self._opener = None
def __init__(self, config, context): TransportMixIn.__init__(self, config, context) XMLSafeTransport.__init__(self)
def __init__(self): TransportMixIn.__init__(self) XMLSafeTransport.__init__(self)
def __init__(self, user, password, *l, **kw): SafeTransport.__init__(self, *l, **kw) self.user = user self.password = password