anchor.diff:  		   ssl:close(TSocket)
   	   end,
       setup_server_connection(Socket, Test);
  +server_init(ssl, pem_cache, Loop, _, Server) ->
  +    {ok, Socket} = ssl:listen(0, ssl_opts(listen_der)),
  +    {ok, {_Host, Port}} = ssl:sockname(Socket),
  +    {ok, Host} = inet:gethostname(),
  +    Server ! {self(), {init, Host, Port}},
  +    Test = fun(TSocket) ->
  +		   ok = ssl:ssl_accept(TSocket),
  +		   Size = byte_size(msg()),
  +		   server_echo(TSocket, Size, Loop),
  +		   ssl:close(TSocket)
  +	   end,
  +    setup_server_connection(Socket, Test);
   
   server_init(Type, Tc, _, _, Server) ->
       io:format("No server init code for ~p ~p~n",[Type, Tc]),
  
positive.code:     {ok, _} = ssl:recv(Socket, Size),
      payload(Loop-1, ssl, D);
  payload(_, _, {Socket, _}) ->
      ssl:close(Socket).
  
  msg() ->
  
negative.code: ssl_opts(listen) ->
      [{backlog, 500} | ssl_opts("server")];
  ssl_opts(connect) ->
      [{verify, verify_peer} | ssl_opts("client")];
  ssl_opts(listen_der) ->
      [{backlog, 500} | ssl_opts("server_der")];
  ssl_opts(connect_der) ->
      [{verify, verify_peer} | ssl_opts("client_der")];
  ssl_opts(Role) ->
      CertData = cert_data(Role),
      [{active, false},
       {depth, 2},
       {reuseaddr, true},
       {mode,binary},
       {nodelay, true},
       {ciphers, [{dhe_rsa,aes_256_cbc,sha}]}
      |CertData].
  
  cert_data(Der) when Der =:= "server_der"; Der =:= "client_der" ->
      [Role,_] = string:tokens(Der, "_"),
      Dir = filename:join([code:lib_dir(ssl), "examples", "certs", "etc"]),
      {ok, CaCert0} = file:read_file(filename:join([Dir, Role, "cacerts.pem"])),
      {ok, Cert0} = file:read_file(filename:join([Dir, Role, "cert.pem"])),
      {ok, Key0} = file:read_file(filename:join([Dir, Role, "key.pem"])),
      [{_, Cert, _}] = public_key:pem_decode(Cert0),
      CaCert1 = public_key:pem_decode(CaCert0),
      CaCert = [CCert || {_, CCert, _} <- CaCert1],
      [{KeyType, Key, _}] = public_key:pem_decode(Key0),
      [{cert, Cert},
       {cacerts, CaCert},
       {key, {KeyType, Key}}];
  cert_data(Role) ->
      Dir = filename:join([code:lib_dir(ssl), "examples", "certs", "etc"]),
      [{cacertfile, filename:join([Dir, Role, "cacerts.pem"])},
       {certfile, filename:join([Dir, Role, "cert.pem"])},
       {keyfile, filename:join([Dir, Role, "key.pem"])}].
  
  bypass_pem_cache_supported() ->
      %% This function is currently critical to support cache bypass
      %% and did not exist in prior versions.
      catch ssl_pkix_db:module_info(), % ensure module is loaded
      erlang:function_exported(ssl_pkix_db, extract_trusted_certs, 1).
  
  