anchor.diff:          ssl_certificate:certificate_chain(PeerCert, ets:new(foo, []), ExtractedCerts, UnordedChain).
   
   
  +signature_algorithms(Config) ->
  +    Opts = proplists:get_value(server_opts, Config),
  +    CertFile = proplists:get_value(certfile, Opts),
  +    io:format("Cert = ~p~n", [CertFile]),
  +    [{_, Cert, _}] = ssl_test_lib:pem_to_der(CertFile),
  +    HashSigns0 = #hash_sign_algos{
  +                   hash_sign_algos = [{sha512, rsa},
  +                                      {sha, dsa},
  +                                      {sha, rsa}]},
  +    Schemes0 = #signature_scheme_list{
  +                 signature_scheme_list = [rsa_pkcs1_sha1,
  +                                          ecdsa_sha1]},
  +    {sha512, rsa} = ssl_handshake:select_hashsign(
  +                      {HashSigns0, Schemes0},
  +                      Cert, ecdhe_rsa,
  +                      tls_v1:default_signature_algs({3,3}),
  +                      {3,3}),
  +    HashSigns1 = #hash_sign_algos{
  +                    hash_sign_algos = [{sha, dsa},
  +                                      {sha, rsa}]},
  +    {sha, rsa} = ssl_handshake:select_hashsign(
  +                      {HashSigns1, Schemes0},
  +                      Cert, ecdhe_rsa,
  +                      tls_v1:default_signature_algs({3,3}),
  +                   {3,3}),
  +    Schemes1 = #signature_scheme_list{
  +                  signature_scheme_list = [rsa_pkcs1_sha256,
  +                                           ecdsa_sha1]},
  +    %% Signature not supported
  +    #alert{} = ssl_handshake:select_hashsign(
  +                 {HashSigns1, Schemes1},
  +                 Cert, ecdhe_rsa,
  +                 tls_v1:default_signature_algs({3,3}),
  +                 {3,3}),
  +    %% No scheme, hashsign is used
  +    {sha, rsa} = ssl_handshake:select_hashsign(
  +                   {HashSigns1, undefined},
  +                   Cert, ecdhe_rsa,
  +                   tls_v1:default_signature_algs({3,3}),
  +                   {3,3}),
  +    HashSigns2 = #hash_sign_algos{
  +                    hash_sign_algos = [{sha, dsa}]},
  +    %% Signature not supported
  +    #alert{} = ssl_handshake:select_hashsign(
  +                 {HashSigns2, Schemes1},
  +                 Cert, ecdhe_rsa,
  +                 tls_v1:default_signature_algs({3,3}),
  +                 {3,3}).
  +
   %%--------------------------------------------------------------------
   %% Internal functions ------------------------------------------------
   %%--------------------------------------------------------------------
  
positive.code: 	  decode_empty_server_sni_correctly,
  	  select_proper_tls_1_2_rsa_default_hashsign,
  	  ignore_hassign_extension_pre_tls_1_2,
            unorded_chain].
  
  %%--------------------------------------------------------------------
  init_per_suite(Config) ->
  
negative.code: -compile(export_all).
  
  -include_lib("common_test/include/ct.hrl").
  -include("ssl_alert.hrl").
  -include("ssl_internal.hrl").
  -include("tls_handshake.hrl").
  -include_lib("public_key/include/public_key.hrl").
  