anchor.diff:  	    []
       end.
   
  -handle_host(Fd, Host, HostList, Key, KeyType) ->
  +handle_host(Fd, KeyToMatch, Host, HostList, Key, KeyType) ->
       Host1 = host_name(Host),
  -    case lists:member(Host1, HostList) and key_match(Key, KeyType) of
  -	true ->
  +    case lists:member(Host1, HostList) andalso key_match(Key, KeyType) of
  +	true when KeyToMatch == Key ->
   	    Key;
  -	false ->
  -	    lookup_host_key_fd(Fd, Host, KeyType)
  +	_ ->
  +	    lookup_host_key_fd(Fd, KeyToMatch, Host, KeyType)
       end.
   
   host_name(Atom) when is_atom(Atom) ->
  
positive.code: 
  %% Used by client
  is_host_key(Key, PeerName, Algorithm, Opts) ->
      case lookup_host_key(PeerName, Algorithm, Opts) of
  	{ok, Key} ->
  	    true;
  	_ ->
  
negative.code: replace_localhost(Host) ->
      Host.
  
  do_lookup_host_key(KeyToMatch, Host, Alg, Opts) ->
      case file:open(file_name(user, "known_hosts", Opts), [read, binary]) of
  	{ok, Fd} ->
  	    Res = lookup_host_key_fd(Fd, KeyToMatch, Host, Alg),
  	    file:close(Fd),
  	    {ok, Res};
  	{error, enoent} -> {error, not_found};
  