Skip to content

Commit

Permalink
Fix function_clause error
Browse files Browse the repository at this point in the history
The error occurs if more than one certificate is configured and the first certificate fails the check by the tls_handshake_1_3:check_cert_sign_algo function. The recursive call to the select_server_cert_key_pair function fails and as a result the TLS connection is not established.
  • Loading branch information
nikita-v committed Dec 13, 2024
1 parent c9491a9 commit ac294e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ssl/src/tls_server_connection_1_3.erl
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ select_server_cert_key_pair(_,[], _,_,_,_, undefined) ->
select_server_cert_key_pair(Session, [#{private_key := Key, certs := [Cert| _] = Certs} | Rest],
ClientSignAlgs, ClientSignAlgsCert, CertAuths,
#state{static_env = #static_env{cert_db = CertDbHandle,
cert_db_ref = CertDbRef} = State},
cert_db_ref = CertDbRef}} = State,
Default0) ->
{_, SignAlgo, SignHash, _, _} = tls_handshake_1_3:get_certificate_params(Cert),
%% TODO: We do validate the signature algorithm and signature hash
Expand Down

0 comments on commit ac294e8

Please sign in to comment.