lws_context_creation_info.ecdh_curve is documented for configuring TLS elliptic curve groups. In lws_create_vhost() the value is correctly copied into vh->tls.ecdh_curve:
if (info->ecdh_curve)
lws_strncpy(vh->tls.ecdh_curve, info->ecdh_curve,
sizeof(vh->tls.ecdh_curve));
However, lws_tls_client_create_vhost_context() in openssl-client.c never calls SSL_CTX_set1_groups_list() (or the older SSL_CTX_set1_curves_list()) on the client SSL_CTX using this value. As a result, the ecdh_curve setting has no effect on TLS clients — the client always advertises OpenSSL's default supported_groups in the ClientHello, ignoring the user's configuration entirely.
By contrast, the server-side code in openssl-server.c does partially handle ecdh_curve (via SSL_CTX_set_tmp_ecdh() / OBJ_sn2nid()), but only for a single curve name, not a colon-separated list.
Additional Issue: vh->tls.ecdh_curve buffer too small for group lists
vh->tls.ecdh_curve is declared as char ecdh_curve[16] in lib/tls/private-network.h. A colon-separated list such as "X25519:P-256:P-384:P-521" (24 bytes + NUL) is silently truncated by lws_strncpy() to "X25519:P-256:P-" — an invalid value. The buffer should be enlarged to accommodate realistic group lists.
On OpenSSL 3.4+, the default supported_groups includes post-quantum groups (X25519MLKEM768) and FFDH groups (ffdhe2048, ffdhe3072) which many deployments need to suppress for interoperability or compliance. The ecdh_curve field is the intended API for this, but it is silently a no-op for clients.
lws_context_creation_info.ecdh_curve is documented for configuring TLS elliptic curve groups. In lws_create_vhost() the value is correctly copied into vh->tls.ecdh_curve:
However,
lws_tls_client_create_vhost_context()inopenssl-client.cnever callsSSL_CTX_set1_groups_list()(or the olderSSL_CTX_set1_curves_list()) on the clientSSL_CTXusing this value. As a result, theecdh_curvesetting has no effect on TLS clients — the client always advertises OpenSSL's defaultsupported_groupsin the ClientHello, ignoring the user's configuration entirely.By contrast, the server-side code in openssl-server.c does partially handle ecdh_curve (via SSL_CTX_set_tmp_ecdh() / OBJ_sn2nid()), but only for a single curve name, not a colon-separated list.
Additional Issue:
vh->tls.ecdh_curvebuffer too small for group listsvh->tls.ecdh_curveis declared aschar ecdh_curve[16]inlib/tls/private-network.h. A colon-separated list such as"X25519:P-256:P-384:P-521"(24 bytes + NUL) is silently truncated bylws_strncpy()to"X25519:P-256:P-"— an invalid value. The buffer should be enlarged to accommodate realistic group lists.On OpenSSL 3.4+, the default supported_groups includes post-quantum groups (X25519MLKEM768) and FFDH groups (ffdhe2048, ffdhe3072) which many deployments need to suppress for interoperability or compliance. The ecdh_curve field is the intended API for this, but it is silently a no-op for clients.