anchor.diff:  	    Alert
       end.
   
  -next_record(#state{tls_cipher_texts = [], socket = Socket} = State) ->
  +next_record(#state{tls_packets = [], tls_cipher_texts = [], socket = Socket} = State) ->
       inet:setopts(Socket, [{active,once}]),
       {no_record, State};
  -next_record(#state{tls_cipher_texts = [CT | Rest], 
  +next_record(#state{tls_packets = [], tls_cipher_texts = [CT | Rest],
   		   connection_states = ConnStates0} = State) ->
       case ssl_record:decode_cipher_text(CT, ConnStates0) of
   	{Plain, ConnStates} ->		      
   	    {Plain, State#state{tls_cipher_texts = Rest, connection_states = ConnStates}};
   	#alert{} = Alert ->
   	    {Alert, State}
  -    end.
  +    end;
  +next_record(State) ->
  +    {no_record, State}.
   
   next_record_if_active(State = 
   		      #state{socket_options = 
  
positive.code:           ssl_options,        % #ssl_options{}
            socket_options,     % #socket_options{}
            connection_states,  % #connection_states{} from ssl_record.hrl
            tls_record_buffer,  % binary() buffer of incomplete records
            tls_handshake_buffer, % binary() buffer of incomplete handshakes
  	  %% {{md5_hash, sha_hash}, {prev_md5, prev_sha}} (binary())
  
negative.code:    	end,
      try
     	{Packets, Buf} = ssl_handshake:get_tls_handshake(Data,Buf0, KeyAlg,Version),
  	State = State0#state{tls_packets = Packets, tls_handshake_buffer = Buf},
  	handle_tls_handshake(Handle, StateName, State)
      catch throw:#alert{} = Alert ->
     	    handle_own_alert(Alert, Version, StateName, State0), 
     	    {stop, normal, State0}
  