#NEWLINE# def make_ssl_socket_factory( ca_certs , validate = True ) : #NEWLINE# #INDENT# '\n    A convenience function for creating an SSL socket factory.\n\n    `ca_certs` should contain the path to the certificate file,\n    `validate` determines whether or not SSL certificate validation will be performed.\n    ' #NEWLINE# def ssl_socket_factory( host , port ) : #NEWLINE# #INDENT# '\n        Returns a :class:`TSSLSocket` instance.\n        ' #NEWLINE# return TSSLSocket . TSSLSocket ( host , port , ca_certs = ca_certs , validate = validate ) #NEWLINE# #UNINDENT# return ssl_socket_factory