#NEWLINE# def _weak_crypto_key_size_pycrypto( context ) : #NEWLINE# #INDENT# func_key_type = { #NEWLINE# #INDENT# 'Crypto.PublicKey.DSA.generate' : 'DSA' , #NEWLINE# 'Crypto.PublicKey.RSA.generate' : 'RSA' , #NEWLINE# #UNINDENT# } #NEWLINE# key_type = func_key_type . get ( context . call_function_name_qual ) #NEWLINE# if key_type : #NEWLINE# #INDENT# key_size = ( context . get_call_arg_value ( 'bits' ) or context . get_call_arg_at_position ( 0 ) or 2048 ) #NEWLINE# return _classify_key_size ( key_type , key_size )