mirror of
https://github.com/curl/curl.git
synced 2025-09-09 13:49:44 +03:00
sectransp: fix building for macOS Sierra and older
Reported-by: Eric Knibbe
Bug: https://github.com/curl/curl/pull/16581#issuecomment-2830837500
Regression from 2d94439eaa
#16581
Closes #17193
This commit is contained in:
parent
4db64a6437
commit
d7914f75aa
|
@ -1092,8 +1092,8 @@ static CURLcode sectransp_connect_step1(struct Curl_cfilter *cf,
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if(connssl->alpn) {
|
if(connssl->alpn) {
|
||||||
#if (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) && \
|
#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11
|
||||||
defined(HAVE_BUILTIN_AVAILABLE)
|
#ifdef HAVE_BUILTIN_AVAILABLE
|
||||||
if(__builtin_available(macOS 10.13.4, iOS 11, tvOS 11, *)) {
|
if(__builtin_available(macOS 10.13.4, iOS 11, tvOS 11, *)) {
|
||||||
#else
|
#else
|
||||||
if(&SSLSetALPNProtocols && &SSLCopyALPNProtocols) {
|
if(&SSLSetALPNProtocols && &SSLCopyALPNProtocols) {
|
||||||
|
@ -1119,6 +1119,7 @@ static CURLcode sectransp_connect_step1(struct Curl_cfilter *cf,
|
||||||
Curl_alpn_to_proto_str(&proto, connssl->alpn);
|
Curl_alpn_to_proto_str(&proto, connssl->alpn);
|
||||||
infof(data, VTLS_INFOF_ALPN_OFFER_1STR, proto.data);
|
infof(data, VTLS_INFOF_ALPN_OFFER_1STR, proto.data);
|
||||||
}
|
}
|
||||||
|
#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ssl_config->key) {
|
if(ssl_config->key) {
|
||||||
|
@ -2092,8 +2093,8 @@ check_handshake:
|
||||||
}
|
}
|
||||||
|
|
||||||
if(connssl->alpn) {
|
if(connssl->alpn) {
|
||||||
#if (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) && \
|
#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11
|
||||||
defined(HAVE_BUILTIN_AVAILABLE)
|
#ifdef HAVE_BUILTIN_AVAILABLE
|
||||||
if(__builtin_available(macOS 10.13.4, iOS 11, tvOS 11, *)) {
|
if(__builtin_available(macOS 10.13.4, iOS 11, tvOS 11, *)) {
|
||||||
#else
|
#else
|
||||||
if(&SSLSetALPNProtocols && &SSLCopyALPNProtocols) {
|
if(&SSLSetALPNProtocols && &SSLCopyALPNProtocols) {
|
||||||
|
@ -2124,6 +2125,7 @@ check_handshake:
|
||||||
if(alpnArr)
|
if(alpnArr)
|
||||||
CFRelease(alpnArr);
|
CFRelease(alpnArr);
|
||||||
}
|
}
|
||||||
|
#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */
|
||||||
}
|
}
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user