anchor.diff:      <<?BYTE(ByteN), NewBinary/binary>> = Binary,
       [ByteN | header(N-1, NewBinary)].
   
  -%% tcp_closed
  -send_or_reply(false, _Pid, undefined, _Data) ->
  -    Report = io_lib:format("SSL(debug): Unexpected Data ~p ~n",[_Data]),
  -    error_logger:error_report(Report),
  -    erlang:error({badarg, _Pid, undefined, _Data}),
  -    ok;
  -send_or_reply(false, _Pid, From, Data) ->
  +send_or_reply(false, _Pid, From, Data) when From =/= undefined ->
       gen_fsm:reply(From, Data);
   send_or_reply(_, Pid, _From, Data) ->
       send_user(Pid, Data).
  
positive.code:     {Record, State} = next_record(State0),
      next_state(hello, Record, State);
  
  abbreviated(Finished = #finished{verify_data = Data},
  	    #state{role = server,
  		   negotiated_version = Version,
  		   tls_handshake_hashes = Hashes,
  
negative.code: handle_alerts([Alert | Alerts], {next_state, StateName, State}) ->
      handle_alerts(Alerts, handle_alert(Alert, StateName, State)).
  
  handle_alert(#alert{level = ?FATAL} = Alert, StateName,
  	     #state{from = From, host = Host, port = Port, session = Session,
  		    user_application = {_Mon, Pid},
  		    log_alert = Log, role = Role, socket_options = Opts} = State) ->
      invalidate_session(Role, Host, Port, Session),
      log_alert(Log, StateName, Alert),
      alert_user(StateName, Opts, Pid, From, Alert, Role),
      {stop, normal, State};
  
  handle_alert(#alert{level = ?WARNING, description = ?CLOSE_NOTIFY} = Alert, 
  	     StateName, #state{from = From, role = Role,  
  			       user_application = {_Mon, Pid}, socket_options = Opts} = State) -> 
      alert_user(StateName, Opts, Pid, From, Alert, Role),
      {stop, normal, State};
  
  handle_alert(#alert{level = ?WARNING, description = ?NO_RENEGOTIATION} = Alert, StateName, 
  