anchor.diff:  		%% This message should not be included in handshake
   		%% message hashes. Starts new handshake (renegotiation)
   		Hs0 = ssl_handshake:init_hashes(),
  -		?MODULE:SName(Packet, State#state{tls_handshake_hashes=Hs0});
  +		?MODULE:SName(Packet, State#state{tls_handshake_hashes=Hs0,
  +						  renegotiation = {true, peer}});
   	   ({#hello_request{} = Packet, _}, {next_state, SName, State}) ->
   		%% This message should not be included in handshake
  -		%% message hashes. If allready in negotiation it will be ignored!
  +		%% message hashes. Already in negotiation so it will be ignored!
   		?MODULE:SName(Packet, State);
   	    ({#client_hello{} = Packet, Raw}, {next_state, connection = SName, State}) ->
   		Hs0 = ssl_handshake:init_hashes(),
   		Hs1 = ssl_handshake:update_hashes(Hs0, Raw),
   		?MODULE:SName(Packet, State#state{tls_handshake_hashes=Hs1,
  -						  renegotiation = true});
  +						  renegotiation = {true, peer}});
   	    ({Packet, Raw}, {next_state, SName, State = #state{tls_handshake_hashes=Hs0}}) ->	
   		Hs1 = ssl_handshake:update_hashes(Hs0, Raw),
   		?MODULE:SName(Packet, State#state{tls_handshake_hashes=Hs1});
  
positive.code:           user_data_buffer,    % binary()
  %%	  tls_buffer,          % Keeps a lookahead one packet if available
  	  log_alert,           % boolean() 
  	  renegotiation,        % boolean()
  	  recv_during_renegotiation,  %boolean() 
  	  send_queue           % queue()
  	 }).
  
negative.code: 	    end
      end;	
  
  handle_sync_event(renegotiate, From, connection, State) ->
      renegotiate(State#state{renegotiation = {true, From}});
  
  handle_sync_event(renegotiate, _, StateName, State) ->
      {reply, {error, already_renegotiating}, StateName, State};
  
  handle_sync_event(info, _, StateName, 
  		  #state{negotiated_version = Version,
  			 session = #session{cipher_suite = Suite}} = State) ->
  