Skip ec_point_format if min_version >= TLS 1.3. Trim a few more bytes from the future QUIC ClientHello. Change-Id: If23c5cd078889a9a26cf2231b51b17c2615a38ea Reviewed-on: https://boringssl-review.googlesource.com/12000 Reviewed-by: Steven Valdez <svaldez@google.com> Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 83bae27..a265a2e 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c
@@ -1853,6 +1853,16 @@ } static int ext_ec_point_add_clienthello(SSL *ssl, CBB *out) { + uint16_t min_version, max_version; + if (!ssl_get_version_range(ssl, &min_version, &max_version)) { + return 0; + } + + /* The point format extension is unneccessary in TLS 1.3. */ + if (min_version >= TLS1_3_VERSION) { + return 1; + } + return ext_ec_point_add_extension(ssl, out); }