#NEWLINE# def matching_keys( self , hostname , port = 22 ) : #NEWLINE# #INDENT# '\n        Generator for identifying all the matching HostKey entries for\n        a given hostname or IP. Finds matches on exact lookup, hashed\n        lookup, and wildcard matching, and pays heed to negation entries.\n        ' #NEWLINE# if ( hostname and ( port != 22 ) ) : #NEWLINE# #INDENT# hostname = ( '[%s]:%d' % ( hostname , port ) ) #NEWLINE# #UNINDENT# for lineno in self . _index [ hostname ] : #NEWLINE# #INDENT# e = HostKeyEntry . from_line ( self . _lines [ lineno ] , lineno , self . _filename ) #NEWLINE# if ( e and ( not e . negated ( hostname ) ) ) : #NEWLINE# #INDENT# ( yield e ) #NEWLINE# #UNINDENT# #UNINDENT# for ( h , lineno ) in self . _hashed_hosts : #NEWLINE# #INDENT# if ( h . startswith ( '|1|' ) and ( paramiko . HostKeys . hash_host ( e , h ) == h ) ) : #NEWLINE# #INDENT# e = HostKeyEntry . from_line ( self . _lines [ lineno ] , lineno , self . _filename ) #NEWLINE# if e : #NEWLINE# #INDENT# ( yield e ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for ( pattern , lineno ) in self . _wildcards : #NEWLINE# #INDENT# if HostKeyEntry . wildcard_match ( hostname , pattern ) : #NEWLINE# #INDENT# e = HostKeyEntry . from_line ( self . _lines [ lineno ] , lineno , self . _filename ) #NEWLINE# if ( e and ( not e . negated ( hostname ) ) ) : #NEWLINE# #INDENT# ( yield e )