anchor.diff:                                                connection_states = ConnectionStates0,
                                                 protocol_specific = PS
                                                } = State0) ->
  -    
  +    #{current_cookie_secret := Cookie} = PS,
       Session = ssl_session:client_select_session({Host, Port, SslOpts}, Cache, CacheCb, Session0),
  -    Hello = dtls_handshake:client_hello(Host, Port, ConnectionStates0, SslOpts,
  -					Session#session.session_id, Renegotiation, OwnCerts),
  +    Hello = dtls_handshake:client_hello(Host, Port, Cookie, ConnectionStates0, SslOpts,
  +					Session#session.session_id, Renegotiation, OwnCerts, undefined),
       Version = Hello#client_hello.client_version,
       HelloVersion = dtls_record:hello_version(Version, Versions),
       State1 = prepare_flight(State0),
  -    {State2, Actions} = 
  -        dtls_gen_connection:send_handshake(Hello, 
  -                                           State1#state{connection_env = 
  +    {State2, Actions} =
  +        dtls_gen_connection:send_handshake(Hello,
  +                                           State1#state{connection_env =
                                                               CEnv#connection_env{negotiated_version = HelloVersion}}),
       State = State2#state{protocol_specific = PS#{flight_state => dtls_gen_connection:initial_flight_state(DataTag)},
                            session = Session},
  
positive.code:     
      {State2, Actions} = dtls_gen_connection:send_handshake(Hello, State1), 
  
      State = State2#state{connection_env = CEnv#connection_env{negotiated_version = Version} % RequestedVersion
                          },
      dtls_gen_connection:next_event(?FUNCTION_NAME, no_record, State, Actions);
  hello(internal, #client_hello{extensions = Extensions} = Hello,
  
negative.code:                              ocsp_nonce := OcspNonceOpt} = SslOpts,
               session = #session{own_certificates = OwnCerts,
                                  session_id = Id},
               connection_states = ConnectionStates0,
  	     protocol_specific = PS
              } = State0) ->
      OcspNonce = tls_handshake:ocsp_nonce(OcspNonceOpt, OcspStaplingOpt),
      Hello = dtls_handshake:client_hello(Host, Port, Cookie, ConnectionStates0,
  