Support for multiple key share entries in ClientHello #2095
-
|
Are there any plans on supporting multiple key share entries in ClientHello for TLS 1.3 as OpenSSL has implemented [1]? We can either use all the key share entries defined in the client or use some logic to select / prioritize which key share algorithms to be sent. [1] openssl/openssl#21633 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
|
Using the low-level TLS API (e.g. subclassing AbstractTlsClient) one can override getEarlyKeyShareGroups for precise control (including multiple shares of course). Using BCJSSE, there's (to my knowledge) no JSSE API that can control this selection. Apart from fiddling around with the default selection logic, we would need to add BCJSSE extensions to help here. A first (simple) option is to add a BCSSLParameters method to simply set the list of groups to send shares for. A second (more complicated) option is a session-like mechanism that tracks what group was previously negotiated for a server (and/or supported_groups sent by the server). For repeated connections/sessions on a given server this adaptive selection should mostly predict "ideally". |
Beta Was this translation helpful? Give feedback.
-
|
I've added BC-specific mechanisms to support configuring the early key_share groups that a BCJSSE client will send. There are two supported mechanisms:
In both cases, a completely empty list will cause no early key shares to be sent, while not setting either will result in the existing default selection behaviour. |
Beta Was this translation helpful? Give feedback.
I've added BC-specific mechanisms to support configuring the early key_share groups that a BCJSSE client will send.
There are two supported mechanisms:
A system property "org.bouncycastle.jsse.client.earlyNamedGroups" with the same syntax as
jdk.tls.namedGroupsi.e. a comma-separated list of group names. Groups must be separately enabled (e.g. by default or viajdk.tls.namedGroupsorSSLParameters.namedGroups) or they will be ignored. This property is read whenever a BCJSSESSLContextis created and will affect all client connections using thatSSLContext.A
BCSSLParameters.earlyNamedGroupsproperty, which is a list of group names likeSSLParameters.namedGroups.SSLSockets created by …