anchor.diff:  			     renegotiate = true})};
   
   handle_event(renegotiate, StateName, State) ->
  -    timer:apply_after(?REKEY_TIMOUT, gen_fsm, send_all_state_event, [self(), renegotiate]),
  -    %% Allready in keyexcahange so ignore
  +    %% Already in key-exchange so safe to ignore
       {next_state, StateName, State};
   
   %% Rekey due to sent data limit reached?
  
positive.code: 	    {next_state, connected, next_packet(State)}
      end;
  handle_event(data_size, StateName, State) ->
      {next_state, StateName, State};
  
  handle_event({request, ChannelPid, ChannelId, Type, Data}, StateName, State0) ->
  
negative.code:     State.
  
  after_new_keys(#state{renegotiate = true} = State) ->
      State1 = State#state{renegotiate = false, event_queue = []},
      lists:foldr(fun after_new_keys_events/2, {next_state, connected, State1}, State#state.event_queue);
  after_new_keys(#state{renegotiate = false, 
  		      ssh_params = #ssh{role = client} = Ssh0} = State) ->
      {Msg, Ssh} = ssh_auth:service_request_msg(Ssh0),
      send_msg(Msg, State),
      {next_state, userauth, State#state{ssh_params = Ssh}};
  after_new_keys(#state{renegotiate = false,  
  		      ssh_params = #ssh{role = server}} = State) ->
      {next_state, userauth, State}.
  
  after_new_keys_events({sync, _Event, From}, {stop, _Reason, _StateData}=Terminator) ->
      gen_fsm:reply(From, {error, closed}),
      Terminator;
  after_new_keys_events(_, {stop, _Reason, _StateData}=Terminator) ->
      Terminator;
  after_new_keys_events({sync, Event, From}, {next_state, StateName, StateData}) ->
      case handle_sync_event(Event, From, StateName, StateData) of
  	{reply, Reply, NextStateName, NewStateData} ->
  	    gen_fsm:reply(From, Reply),
  	    {next_state, NextStateName, NewStateData};
  	{next_state, NextStateName, NewStateData}->
  	    {next_state, NextStateName, NewStateData};
  	{stop, Reason, Reply, NewStateData} ->
  	    gen_fsm:reply(From, Reply),
  	    {stop, Reason, NewStateData}
      end;
  after_new_keys_events({event, Event}, {next_state, StateName, StateData}) ->
      case handle_event(Event, StateName, StateData) of
  	{next_state, NextStateName, NewStateData}->
  	    {next_state, NextStateName, NewStateData};
  	{stop, Reason, NewStateData} ->
  	    {stop, Reason, NewStateData}
      end;
  after_new_keys_events({connection_reply, _Data} = Reply, {StateName, State}) ->
      NewState = send_replies([Reply], State),
      {next_state, StateName, NewState}.
  
  handle_ssh_packet_data(RemainingSshPacketLen, DecData, EncData, StateName, 
  		       State) ->
  