#NEWLINE# @ staticmethod #NEWLINE# def configure_context( context , config ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# _ecCurve = _OpenSSLECCurve ( _defaultCurveName ) #NEWLINE# _ecCurve . addECKeyToContext ( context ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# logger . exception ( 'Failed to enable elliptic curve for TLS' ) #NEWLINE# #UNINDENT# context . set_options ( ( SSL . OP_NO_SSLv2 | SSL . OP_NO_SSLv3 ) ) #NEWLINE# context . use_certificate_chain_file ( config . tls_certificate_file ) #NEWLINE# if ( not config . no_tls ) : #NEWLINE# #INDENT# context . use_privatekey ( config . tls_private_key ) #NEWLINE# #UNINDENT# context . load_tmp_dh ( config . tls_dh_params_path ) #NEWLINE# context . set_cipher_list ( '!ADH:HIGH+kEDH:!AECDH:HIGH+kEECDH' )