summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2020-08-09 16:25:54 +0000
committerjsing <>2020-08-09 16:25:54 +0000
commitd7da60dd1b50ad2db5c3c488fe20d8b67c703233 (patch)
tree4f4d9cf2de319bbd1c3f294e69466ef30178ec96
parentb3dbcda2404dbe31481fae8d6817cbc0a3362031 (diff)
downloadopenbsd-d7da60dd1b50ad2db5c3c488fe20d8b67c703233.tar.gz
openbsd-d7da60dd1b50ad2db5c3c488fe20d8b67c703233.tar.bz2
openbsd-d7da60dd1b50ad2db5c3c488fe20d8b67c703233.zip
Add P-521 to the list of curves supported by default in the client.
A certain VPN provider appears to have configured their servers to only accept P-521 for TLSv1.3 key exchange. The particular VPN software in use also does not currently allow for the TLSv1.3 key share groups to be configured, which means that there is no way to easily use LibreSSL in this situation. Include P-521 in the list of curves that are supported by default in the client, in order to increase interoperability. Discussed at length with beck@, inoguchi@ and tb@. ok tb@
-rw-r--r--src/lib/libssl/t1_lib.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c
index 6a2b082d02..1191f9201e 100644
--- a/src/lib/libssl/t1_lib.c
+++ b/src/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_lib.c,v 1.168 2020/07/07 19:31:11 jsing Exp $ */ 1/* $OpenBSD: t1_lib.c,v 1.169 2020/08/09 16:25:54 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -242,7 +242,14 @@ static const uint16_t eccurves_list[] = {
242}; 242};
243#endif 243#endif
244 244
245static const uint16_t eccurves_default[] = { 245static const uint16_t eccurves_client_default[] = {
246 29, /* X25519 (29) */
247 23, /* secp256r1 (23) */
248 24, /* secp384r1 (24) */
249 25, /* secp521r1 (25) */
250};
251
252static const uint16_t eccurves_server_default[] = {
246 29, /* X25519 (29) */ 253 29, /* X25519 (29) */
247 23, /* secp256r1 (23) */ 254 23, /* secp256r1 (23) */
248 24, /* secp384r1 (24) */ 255 24, /* secp384r1 (24) */
@@ -366,9 +373,15 @@ tls1_get_group_list(SSL *s, int client_groups, const uint16_t **pgroups,
366 373
367 *pgroups = s->internal->tlsext_supportedgroups; 374 *pgroups = s->internal->tlsext_supportedgroups;
368 *pgroupslen = s->internal->tlsext_supportedgroups_length; 375 *pgroupslen = s->internal->tlsext_supportedgroups_length;
369 if (*pgroups == NULL) { 376 if (*pgroups != NULL)
370 *pgroups = eccurves_default; 377 return;
371 *pgroupslen = sizeof(eccurves_default) / 2; 378
379 if (!s->server) {
380 *pgroups = eccurves_client_default;
381 *pgroupslen = sizeof(eccurves_client_default) / 2;
382 } else {
383 *pgroups = eccurves_server_default;
384 *pgroupslen = sizeof(eccurves_server_default) / 2;
372 } 385 }
373} 386}
374 387