Skip to contentSkip to conversation

Allow use of TLS 1.3

PATCH In review Loganaden Velvindron 3 participants 3 messages Mar 29, 2018 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Allow use of TLS 1.3

Add a tlsv1.3 option to http.sslVersion in addition to the existing tlsv1.[012] options. libcurl has supported this since 7.52.0.

This requires OpenSSL 1.1.1 with TLS 1.3 enabled or curl built with recent versions of NSS or BoringSSL as the TLS backend.

---
 Documentation/config.txt | 1 +
 http.c                   | 3 +++
 2 files changed, 4 insertions(+)
Documentation/config.txt +1 -0
index ce9102cea..f31d62772 100644
@@ -1957,6 +1957,7 @@ http.sslVersion::
 	- tlsv1.0
 	- tlsv1.1
 	- tlsv1.2
+	- tlsv1.3
 
 +
 Can be overridden by the `GIT_SSL_VERSION` environment variable.
http.c +3 -0
index a5bd5d62c..f84b18551 100644
@@ -62,6 +62,9 @@ static struct {
 	{ "tlsv1.1", CURL_SSLVERSION_TLSv1_1 },
 	{ "tlsv1.2", CURL_SSLVERSION_TLSv1_2 },
 #endif
+#if LIBCURL_VERSION_NUM >= 0x073400
+	{ "tlsv1.3", CURL_SSLVERSION_TLSv1_3 }
+#endif
 };
 #if LIBCURL_VERSION_NUM >= 0x070903
 static const char *ssl_key;
Signature · 1 line
2.16.2
#1 lore raw

Hi Logan,

Quoted 5 lines · Loganaden Velvindron

Add a tlsv1.3 option to http.sslVersion in addition to the existing tlsv1.[012] options. libcurl has supported this since 7.52.0.

This requires OpenSSL 1.1.1 with TLS 1.3 enabled or curl built with recent versions of NSS or BoringSSL as the TLS backend.

Thank you,
Johannes

#2 lore raw
In reply to Loganaden Velvindron

http.c static struct { · line 66

Quoted 10 lines · Loganaden Velvindron
http.c +2 -0
index a5bd5d62c..f84b18551 100644
@@ -62,6 +62,9 @@ static struct {
 	{ "tlsv1.1", CURL_SSLVERSION_TLSv1_1 },
 	{ "tlsv1.2", CURL_SSLVERSION_TLSv1_2 },
 #endif
+#if LIBCURL_VERSION_NUM >= 0x073400
+	{ "tlsv1.3", CURL_SSLVERSION_TLSv1_3 }

Looks OK to me, except one minor nit.

I'll add a trailing comma for this entry while queuing, so that a future patch to add tlsv1.4 or whatever won't have to worry about it.

Thanks.

Quoted 4 lines
http.c +1 -0
+#endif
 };
 #if LIBCURL_VERSION_NUM >= 0x070903
 static const char *ssl_key;