anchor.diff:  -include_lib("public_key/include/public_key.hrl").
   -include("test_server.hrl").
   -include("test_server_line.hrl").
  +-include("../src/ssh.hrl").
   
   -define(TIMEOUT, 50000).
  --define(SSH_DEFAULT_PORT, 22).
   
   connect(Options) ->
       connect(hostname(), inet_port(), Options).
  
positive.code:     {Cert, encode_key(SubjectPrivateKey)}.
  
  %%--------------------------------------------------------------------
  %% Writes pem files in Dir with FileName ++ ".pem" and FileName ++ "_key.pem"
  %% write_pem(::string(), ::string(), {Cert,Key}) -> ok
  %%--------------------------------------------------------------------
  write_pem(Dir, FileName, {Cert, Key = {_,_,not_encrypted}}) when is_binary(Cert) ->
      ok = der_to_pem(filename:join(Dir, FileName ++ ".pem"),
  			       [{'Certificate', Cert, not_encrypted}]),
      ok = der_to_pem(filename:join(Dir, FileName ++ "_key.pem"), [Key]).
  
  %%--------------------------------------------------------------------
  %% Creates a rsa key (OBS: for testing only)
  
negative.code:     end.
  
  
  make_dsa_cert_files(Config) ->    
      make_dsa_cert_files("", Config).
  
  make_dsa_cert_files(RoleStr, Config) ->    
      
      CaInfo = {CaCert, _} = make_cert([{key, dsa}]),
      {Cert, CertKey} = make_cert([{key, dsa}, {issuer, CaInfo}]),
      CaCertFile = filename:join([?config(data_dir, Config), 
   				RoleStr, "dsa_cacerts.pem"]),
      CertFile = filename:join([?config(data_dir, Config), 
   			      RoleStr, "dsa_cert.pem"]),
      KeyFile = filename:join([?config(data_dir, Config), 
  			     RoleStr, "dsa_key.pem"]),
      
      der_to_pem(CaCertFile, [{'Certificate', CaCert, not_encrypted}]),
      der_to_pem(CertFile, [{'Certificate', Cert, not_encrypted}]),
      der_to_pem(KeyFile, [CertKey]),
      {CaCertFile, CertFile, KeyFile}.
  
  make_dsa_public_key_file(P, Q, G, Y, Config) ->
      PK = #ssh_key{type = dsa, public = {P,Q,G,Y}},
      Enc = ssh_file:encode_public_key(PK),
      B64 = ssh_bits:b64_encode(Enc),
      FileName = filename:join([?config(data_dir, Config), "ssh_host_dsa_key.pub"]),
      file:write_file(FileName, <<"ssh-dss ", B64/binary>>).
  
  
  %%--------------------------------------------------------------------
  