def __init__(self, sock, keyfile=None, certfile=None, trustfile=None): # Bug (QPID-4337): this is the "old" version of python SSL. # The private key is required. If a certificate is given, but no # keyfile, assume the key is contained in the certificate if certfile and not keyfile: keyfile = certfile self.sock = sock self.ssl = wrap_socket(sock, keyfile=keyfile, certfile=certfile)
def __init__(self, sock): self.sock = sock self.ssl = wrap_socket(sock)
def __init__(self, sock, keyfile=None, certfile=None, trustfile=None): if keyfile or certfile: # BZ825078 - client authentication with old API not yet tested raise Exception("Client authentication not supported by this version.") self.sock = sock self.ssl = wrap_socket(sock, keyfile=keyfile, certfile=certfile)