anchor.diff:  %% Internal functions  -----------------------------------------------
   %%--------------------------------------------------------------------
   
  +make_cert_files(Alg1, Alg2, Prefix, Dir) ->
  +    CaInfo = {CaCert,_} = erl_make_certs:make_cert([{key,Alg1}]),
  +    {Cert,CertKey} = erl_make_certs:make_cert([{key,Alg2},{issuer,CaInfo}]),
  +    CaCertFile = filename:join(Dir, Prefix++"cacerts.pem"),
  +    CertFile = filename:join(Dir, Prefix++"cert.pem"),
  +    KeyFile = filename:join(Dir, Prefix++"key.pem"),
  +    der_to_pem(CaCertFile, [{'Certificate', CaCert, not_encrypted}]),
  +    der_to_pem(CertFile, [{'Certificate', Cert, not_encrypted}]),
  +    der_to_pem(KeyFile, [CertKey]),
  +    ok.
  +
  +der_to_pem(File, Entries) ->
  +    PemBin = public_key:pem_encode(Entries),
  +    file:write_file(File, PemBin).
  +
  +%%--------------------------------------------------------------------
   chk_file(Path=[C|_], ExpectedContents, Config) when 0<C,C=<255 ->
       chk_file([Path], ExpectedContents, Config);
   
  
positive.code: 	  fun(__CONF__) -> 
  		  DataDir = ?config(data_dir,__CONF__),
  		  ConfFile = filename:join(DataDir, "vsftpd.conf"),
  		  AnonRoot = ?config(priv_dir,__CONF__),
  		  Cmd = ["vsftpd "++filename:join(DataDir,"vsftpd.conf"),
  			 " -oftpd_banner=erlang_otp_testing",
  			 " -oanon_root=\"",AnonRoot,"\"",
  			 " -orsa_cert_file=\"",filename:join(DataDir,"cert.pem"),"\"",
  			 " -orsa_private_key_file=\"",filename:join(DataDir,"key.pem"),"\""
  			],
  		  Result = os:cmd(Cmd),
  		  ct:log("Config file:~n~s~n~nServer start command:~n  ~s~nResult:~n  ~p",
  
negative.code: 	{ok,Data} -> 
  	    TstDir = filename:join(?config(priv_dir,Config), "test"),
  	    file:make_dir(TstDir),
  	    make_cert_files(dsa, rsa, "server-", ?config(data_dir,Config)),
  	    start_ftpd([{test_dir,TstDir},
  			{ftpd_data,Data}
  			| Config])
  