[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 145/163: darwinssl: allow High Sierra users to buil
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 145/163: darwinssl: allow High Sierra users to build the code using GCC |
Date: |
Sun, 05 Aug 2018 12:37:51 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit b78d1a3d4563a055aa3abcc750b721f01b55dc24
Author: Nick Zitzmann <address@hidden>
AuthorDate: Sun Jul 1 14:05:50 2018 -0500
darwinssl: allow High Sierra users to build the code using GCC
...but GCC users lose out on TLS 1.3 support, since we can't weak-link
enumeration constants.
Fixes #2656
Closes #2703
---
lib/vtls/darwinssl.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c
index 45fe49d82..f29b5acad 100644
--- a/lib/vtls/darwinssl.c
+++ b/lib/vtls/darwinssl.c
@@ -1252,14 +1252,13 @@ static CURLcode darwinssl_version_from_curl(SSLProtocol
*darwinver,
return CURLE_OK;
case CURL_SSLVERSION_TLSv1_3:
/* TLS 1.3 support first appeared in iOS 11 and macOS 10.13 */
-#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11
- /* We can assume __builtin_available() will always work in the
- 10.13/11.0 SDK: */
+#if (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) && HAVE_BUILTIN_AVAILABLE == 1
if(__builtin_available(macOS 10.13, iOS 11.0, *)) {
*darwinver = kTLSProtocol13;
return CURLE_OK;
}
-#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */
+#endif /* (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) &&
+ HAVE_BUILTIN_AVAILABLE == 1 */
break;
}
return CURLE_SSL_CONNECT_ERROR;
@@ -1278,7 +1277,7 @@ set_ssl_version_min_max(struct connectdata *conn, int
sockindex)
/* macOS 10.5-10.7 supported TLS 1.0 only.
macOS 10.8 and later, and iOS 5 and later, added TLS 1.1 and 1.2.
macOS 10.13 and later, and iOS 11 and later, added TLS 1.3. */
-#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11
+#if (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) && HAVE_BUILTIN_AVAILABLE == 1
if(__builtin_available(macOS 10.13, iOS 11.0, *)) {
max_supported_version_by_os = CURL_SSLVERSION_MAX_TLSv1_3;
}
@@ -1287,7 +1286,8 @@ set_ssl_version_min_max(struct connectdata *conn, int
sockindex)
}
#else
max_supported_version_by_os = CURL_SSLVERSION_MAX_TLSv1_2;
-#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */
+#endif /* (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) &&
+ HAVE_BUILTIN_AVAILABLE == 1 */
switch(ssl_version) {
case CURL_SSLVERSION_DEFAULT:
@@ -1430,7 +1430,7 @@ static CURLcode darwinssl_connect_step1(struct
connectdata *conn,
case CURL_SSLVERSION_DEFAULT:
case CURL_SSLVERSION_TLSv1:
(void)SSLSetProtocolVersionMin(BACKEND->ssl_ctx, kTLSProtocol1);
-#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11
+#if (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) && HAVE_BUILTIN_AVAILABLE == 1
if(__builtin_available(macOS 10.13, iOS 11.0, *)) {
(void)SSLSetProtocolVersionMax(BACKEND->ssl_ctx, kTLSProtocol13);
}
@@ -1439,7 +1439,8 @@ static CURLcode darwinssl_connect_step1(struct
connectdata *conn,
}
#else
(void)SSLSetProtocolVersionMax(BACKEND->ssl_ctx, kTLSProtocol12);
-#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */
+#endif /* (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) &&
+ HAVE_BUILTIN_AVAILABLE == 1 */
break;
case CURL_SSLVERSION_TLSv1_0:
case CURL_SSLVERSION_TLSv1_1:
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 137/163: RELEASE-NOTES: synced, (continued)
- [GNUnet-SVN] [gnurl] 137/163: RELEASE-NOTES: synced, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 127/163: RELEASE-NOTES: synced, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 147/163: smtp: use the upload buffer size for scratch buffer malloc, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 125/163: CURLINFO_TLS_SSL_PTR.3: improve the example, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 160/163: gnurl: post-merge adjustments, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 152/163: schannel: fix -Wsign-compare warning, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 151/163: schannel: workaround for wrong function signature in w32api, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 158/163: release: 7.61.0, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 155/163: CMake: remove redundant and old end-of-block syntax, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 115/163: RELEASE-NOTES: synced, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 145/163: darwinssl: allow High Sierra users to build the code using GCC,
gnunet <=
- [GNUnet-SVN] [gnurl] 141/163: libssh: goto DISCONNECT state on error, not SSH_SESSION_FREE, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 130/163: docs: fix missed option name markups, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 156/163: post303.d: clarify that this is an RFC violation, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 139/163: KNOWN_BUGS: Borland support is dropped, AIX problem is too old, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 119/163: GOVERNANCE: linkify, changed some titles, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 82/163: test 46: make test pass after 2025, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 84/163: schannel: avoid incompatible pointer warning, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 89/163: progress: remove a set of unused defines, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 70/163: axtls: follow-up spell fix of comment, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 91/163: KNOWN_BUGS: slow connect to localhost on Windows, gnunet, 2018/08/05