anchor.diff:  alert_event(Alert) ->
       send_all_state_event(self(), Alert).
   
  -
  -%% TODO: This clause is not yet supported. Do we need 
  -%% to support it, not supported by openssl!
  -handle_peer_cert(PeerCert, {Algorithm, _, _} = PublicKeyInfo,
  -		 #state{negotiated_version = Version,
  -			session = Session} = 
  -		 State0) when Algorithm == dh_rsa; 
  -			      Algorithm == dh_dss ->
  -    case public_key:pkix_is_fixed_dh_cert(PeerCert) of
  -	true ->
  -	    %% TODO: extract DH-params from cert and save 
  -	    %% Keys and SharedSecret in state.
  -	    %% {P, G,  ServerPublicDhKey}= extract .....
  -	    %% Keys = {ClientDhPublicKey, _} = 
  -	    %%	public_key:gen_key(#'DHParameter'{prime = P, base = G}),
  -	    %%SharedSecret = dh_shared_secret(ServerPublicDhKey, 
  -	    %%				    ClientDhPublicKey,
  -            %%					    [P, G]),
  -	    %% ssl_handshake:master_secret ...
  -	    State = State0#state{session = 
  -				 Session#session{peer_certificate 
  -						 = PeerCert},
  -				 public_key_info = PublicKeyInfo},
  -	    {next_state, certify, next_record(State)};
  -	    
  -	false ->
  -	    Alert  = ?ALERT_REC(?FATAL,?HANDSHAKE_FAILURE),
  -	    handle_own_alert(Alert, Version, certify_certificate, State0), 
  -	    {stop, normal, State0}
  -    end;
  -	
  +%% We do currently not support cipher suites that use fixed DH.
  +%% If we want to implement that we should add a code
  +%% here to extract DH parameters form cert.
   handle_peer_cert(PeerCert, PublicKeyInfo, 
   		 #state{session = Session} = State0) ->
       State = State0#state{session = 
  
positive.code: 	    {stop, normal, State}
      end;
  
  %% %% This is the code for {packet,ssl} removed because it was slower 
  %% %% than handling it in erlang.
  %% handle_info(Data = #ssl_tls{}, StateName, 
  %% 	    State = #state{tls_buffer = Buffer,
  %% 			   socket = Socket,
  %% 			   connection_states = ConnectionStates0}) ->
  %%     case Buffer of
  %% 	buffer ->
  %% 	    {next_state, StateName, State#state{tls_buffer = [Data]}};
  %% 	continue ->
  %% 	    inet:setopts(Socket, [{active,once}]),
  %% 	    {Plain, ConnectionStates} =
  %% 		ssl_record:decode_cipher_text(Data, ConnectionStates0),
  %% 	    gen_fsm:send_all_state_event(self(), Plain),
  %% 	    {next_state, StateName, 
  %% 	     State#state{tls_buffer = buffer, 
  %% 			 connection_states = ConnectionStates}};
  %% 	List when is_list(List) ->
  %% 	    {next_state, StateName, 
  %% 	     State#state{tls_buffer = Buffer ++ [Data]}}	
  %%     end;
  
  %% handle_info(CloseMsg = {_, Socket}, StateName0, 
  %% 	    #state{socket = Socket,tls_buffer = [Msg]} = State0) ->
  %%     %% Hmm we have a ssl_tls msg buffered, handle that first
  %%     %% and it proberbly is a close alert  
  %%     {next_state, StateName0, State0#state{tls_buffer=[Msg,{ssl_close,CloseMsg}]}};
  	
  handle_info({CloseTag, Socket}, _StateName,
              #state{socket = Socket, close_tag = CloseTag,
  		   negotiated_version = Version, host = Host,
  
negative.code:        Algo == dh_rsa ->
      State;
  
  %key_exchange(#state{role = server, key_algorithm = rsa_export} = State) ->
      %% TODO when the public key in the server certificate is
      %% less than or equal to 512 bits in length dont send key_exchange
      %% but do it otherwise
  %    State;
  
  key_exchange(#state{role = server, key_algorithm = Algo,
  		    diffie_hellman_params = Params,
  