close
Skip to content

ssl:connect fails when {handshake, hello} option is specified and the target server 's key exchange preferences are ordered differently #11030

@VasiliyS

Description

@VasiliyS

Describe the bug
ssl:connect fails when {handshake, hello} option is specified and the target server 's key exchange preferences are ordered differently.

E.g. client's {supported_groups, [x25519, x25519mlkem768]} and server's order of preference is [x25519mlkem768, ...].

To Reproduce
using the default order of supported groups:

ssl:connect("www.linkedin.com", 443, [{verify, verify_none}, {handshake, hello}]).
** exception error: no function clause matching ssl_handshake:extension_value({key_share_hello_retry_request,x25519mlkem768}) (ssl_handshake.erl:1983)
     in function  maps:map_1/3 (maps.erl:942)
     in call from maps:map_1/3 (maps.erl:942)
     in call from maps:map/2 (maps.erl:927)
     in call from ssl_gen_statem:handshake/2 (ssl_gen_statem.erl:294)
     in call from tls_socket:start_tls_client_connection/7 (tls_socket.erl:456)
     in call from ssl:connect/4 (ssl.erl:2292)

Expected behavior

sslsocket and server ext value are returned

Affected versions

Tested on 28.4.2

Additional context

None

Metadata

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:PSAssigned to OTP team PS

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions