anchor.diff:             end,
       spawn(Kill).
   
  -maybe_generate_key_share(#ssl_options{
  +maybe_generate_client_shares(#ssl_options{
                               versions = [Version|_],
                               supported_groups =
                                   #supported_groups{
                                     supported_groups = Groups}})
     when Version =:= {3,4} ->
       ssl_cipher:generate_client_shares(Groups);
  -maybe_generate_key_share(_) ->
  +maybe_generate_client_shares(_) ->
       undefined.
  +
  +choose_tls_version(#ssl_options{versions = Versions},
  +                   #client_hello{
  +                      extensions = #{client_hello_versions :=
  +                                         #client_hello_versions{versions = ClientVersions}
  +                                    }
  +                     }) ->
  +    case ssl_handshake:select_supported_version(ClientVersions, Versions) of
  +        {3,4} ->
  +            'tls_v1.3';
  +        _Else ->
  +            'tls_v1.2'
  +    end;
  +choose_tls_version(_, _) ->
  +    'tls_v1.2'.
  +
  +
  +effective_version(undefined, #ssl_options{versions = [Version|_]}) ->
  +    Version;
  +effective_version(Version, _) ->
  +    Version.
  
positive.code: 	    session_cache = Cache,
  	    session_cache_cb = CacheCb
  	   } = State0) ->
      KeyShare = maybe_generate_key_share(SslOpts),
      Timer = ssl_connection:start_or_recv_cancel_timer(Timeout, From),
      Hello = tls_handshake:client_hello(Host, Port, ConnectionStates0, SslOpts,
  				       Cache, CacheCb, Renegotiation, Cert, KeyShare),
  
negative.code:     #ssl_options{beast_mitigation = BeastMitigation,
                   erl_dist = IsErlDist} = SSLOptions,
      ConnectionStates = tls_record:init_connection_states(Role, BeastMitigation),
      ErlDistData = erl_dist_data(IsErlDist),
      SessionCacheCb = case application:get_env(ssl, session_cb) of
  			 {ok, Cb} when is_atom(Cb) ->
  