def wrapClientTLS(connectionCreator, wrappedEndpoint):
 if (TLSMemoryBIOFactory is None):
  raise NotImplementedError('OpenSSL not available. Try `pip install twisted[tls]`.')
 return _WrapperEndpoint(wrappedEndpoint, (lambda protocolFactory: TLSMemoryBIOFactory(connectionCreator, True, protocolFactory)))

def wrapClientTLS ( connectionCreator , wrappedEndpoint ) : if ( TLSMemoryBIOFactory is None ) : raise NotImplementedError ( 'OpenSSL not available. Try `pip install twisted[tls]`.' ) return _WrapperEndpoint ( wrappedEndpoint , ( lambda protocolFactory : TLSMemoryBIOFactory ( connectionCreator , True , protocolFactory ) ) )
wrap an endpoint which upgrades to tls as soon as the connection is established .