anchor.diff:  send_user(Pid, Msg) ->
       Pid ! Msg.
   
  -%% %% This is the code for {packet,ssl} removed because it was slower 
  -%% %% than handling it in erlang.
  -%% next_record(#state{socket = Socket, 
  -%% 		   tls_buffer = [Msg|Rest],
  -%% 		   connection_states = ConnectionStates0} = State) ->
  -%%     Buffer =
  -%% 	case Rest of
  -%% 	    [] -> 
  -%% 		inet:setopts(Socket, [{active,once}]),
  -%% 		buffer;
  -%% 	    _ -> Rest
  -%% 	end,
  -%%     case Msg of
  -%% 	#ssl_tls{} ->
  -%% 	    {Plain, ConnectionStates} =
  -%% 		ssl_record:decode_cipher_text(Msg, ConnectionStates0),
  -%% 	    gen_fsm:send_all_state_event(self(), Plain),
  -%% 	    State#state{tls_buffer=Buffer, connection_states = ConnectionStates};
  -%% 	{ssl_close, Msg} ->
  -%% 	    self() ! Msg,
  -%% 	    State#state{tls_buffer=Buffer}
  -%%     end;
  -%% next_record(#state{socket = Socket, tls_buffer = undefined} = State) ->
  -%%     inet:setopts(Socket, [{active,once}]),
  -%%     State#state{tls_buffer=continue};
  -%% next_record(State) ->
  -%%     State#state{tls_buffer=continue}.
  -
   next_record(#state{tls_cipher_texts = [], socket = Socket} = State) ->
       inet:setopts(Socket, [{active,once}]),
       State;
  
positive.code: certify(#server_key_exchange{}, 
          State = #state{role = client, negotiated_version = Version,
                         key_algorithm = Alg}) 
    when Alg == rsa; Alg == dh_dss; Alg == dh_rsa ->
      Alert = ?ALERT_REC(?FATAL, ?UNEXPECTED_MESSAGE),
      handle_own_alert(Alert, Version, certify_server_key_exchange, State),
      {stop, normal, State};
  
negative.code: alert_event(Alert) ->
      send_all_state_event(self(), Alert).
  
  %% 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 = 
  