def _parseClientTLS(reactor, host, port, timeout='30', bindAddress=None, certificate=None, privateKey=None, trustRoots=None, endpoint=None, **kwargs):
 if kwargs:
  raise TypeError('unrecognized keyword arguments present', list(kwargs.keys()))
 host = (host if isinstance(host, unicode) else host.decode('utf-8'))
 bindAddress = (bindAddress if (isinstance(bindAddress, unicode) or (bindAddress is None)) else bindAddress.decode('utf-8'))
 port = int(port)
 timeout = int(timeout)
 return wrapClientTLS(optionsForClientTLS(host, trustRoot=_parseTrustRootPath(trustRoots), clientCertificate=_privateCertFromPaths(certificate, privateKey)), (clientFromString(reactor, endpoint) if (endpoint is not None) else HostnameEndpoint(reactor, _idnaBytes(host), port, timeout, bindAddress)))

def _parseClientTLS ( reactor , host , port , timeout = '30' , bindAddress = None , certificate = None , privateKey = None , trustRoots = None , endpoint = None , ** kwargs ) : if kwargs : raise TypeError ( 'unrecognized keyword arguments present' , list ( kwargs . keys ( ) ) ) host = ( host if isinstance ( host , unicode ) else host . decode ( 'utf-8' ) ) bindAddress = ( bindAddress if ( isinstance ( bindAddress , unicode ) or ( bindAddress is None ) ) else bindAddress . decode ( 'utf-8' ) ) port = int ( port ) timeout = int ( timeout ) return wrapClientTLS ( optionsForClientTLS ( host , trustRoot = _parseTrustRootPath ( trustRoots ) , clientCertificate = _privateCertFromPaths ( certificate , privateKey ) ) , ( clientFromString ( reactor , endpoint ) if ( endpoint is not None ) else HostnameEndpoint ( reactor , _idnaBytes ( host ) , port , timeout , bindAddress ) ) )
internal method to construct an endpoint from string parameters .