Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation warnings when building for iOS min version 13 #11098

Closed
jnavarrom opened this issue May 10, 2023 · 9 comments
Closed

Compilation warnings when building for iOS min version 13 #11098

jnavarrom opened this issue May 10, 2023 · 9 comments

Comments

@jnavarrom
Copy link

jnavarrom commented May 10, 2023

I did this

Compiling curl for iOS and min versions iOS 13

configure: Configured to build curl/libcurl:

  Host setup:       arm-apple-darwin
  Install prefix:   /usr/local
  Compiler:         /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch arm64
   CFLAGS:          -Os -arch arm64 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk -miphoneos-version-min=13.0 -Qunused-arguments -Wno-pointer-bool-conversion -Werror=partial-availability
   CPPFLAGS:        -Os -arch arm64 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk -miphoneos-version-min=13.0 -DNDEBUG
   LDFLAGS:         -Os -arch arm64 -Wl,-dead_strip -miphoneos-version-min=13.0 -framework CoreFoundation -framework Security
   LIBS:            -lz

  curl version:     8.0.1
  SSL:              enabled (Secure Transport)
  SSH:              no      (--with-{libssh,libssh2})
  zlib:             enabled
  brotli:           no      (--with-brotli)
  zstd:             no      (--with-zstd)
  GSS-API:          no      (--with-gssapi)
  GSASL:            no      (libgsasl not found)
  TLS-SRP:          no      (--enable-tls-srp)
  resolver:         POSIX threaded
  IPv6:             enabled
  Unix sockets:     enabled
  IDN:              no      (--with-{libidn2,winidn})
  Build libcurl:    Shared=no, Static=yes
  Built-in manual:  no      (--enable-manual)
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  Code coverage:    disabled
  SSPI:             no      (--enable-sspi)
  ca cert bundle:   no
  ca cert path:     
  ca fallback:      
  LDAP:             no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS:            no      (--enable-ldaps)
  RTSP:             no      (--enable-rtsp)
  RTMP:             no      (--with-librtmp)
  PSL:              no      (libpsl not found)
  Alt-svc:          enabled (--disable-alt-svc)
  Headers API:      enabled (--disable-headers-api)
  HSTS:             enabled (--disable-hsts)
  HTTP1:            enabled (internal)
  HTTP2:            no      (--with-nghttp2, --with-hyper)
  HTTP3:            no      (--with-ngtcp2, --with-quiche --with-msh3)
  ECH:              no      (--enable-ech)
  WebSockets:       no      (--enable-websockets)
  Protocols:        HTTP HTTPS MQTT
  Features:         AsynchDNS HSTS HTTPS-proxy IPv6 Largefile NTLM NTLM_WB SSL UnixSockets alt-svc libz threadsafe

Compilation warnings:

md4.c:117:9: warning: 'CC_MD4_Init' is deprecated: first deprecated in iOS 13.0 - This function is cryptographically broken and should not be used in security contexts. Clients should migrate to SHA256 (or stronger). [-Wdeprecated-declarations]
  (void)CC_MD4_Init(ctx);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/include/CommonCrypto/CommonDigest.h:106:12: note: 'CC_MD4_Init' has been explicitly marked deprecated here
extern int CC_MD4_Init(CC_MD4_CTX *c)
           ^
md4.c:122:9: warning: 'CC_MD4_Update' is deprecated: first deprecated in iOS 13.0 - This function is cryptographically broken and should not be used in security contexts. Clients should migrate to SHA256 (or stronger). [-Wdeprecated-declarations]
  (void)CC_MD4_Update(ctx, data, (CC_LONG)size);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/include/CommonCrypto/CommonDigest.h:109:12: note: 'CC_MD4_Update' has been explicitly marked deprecated here
extern int CC_MD4_Update(CC_MD4_CTX *c, const void *data, CC_LONG len)
           ^
md4.c:127:9: warning: 'CC_MD4_Final' is deprecated: first deprecated in iOS 13.0 - This function is cryptographically broken and should not be used in security contexts. Clients should migrate to SHA256 (or stronger). [-Wdeprecated-declarations]
  (void)CC_MD4_Final(result, ctx);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/include/CommonCrypto/CommonDigest.h:112:12: note: 'CC_MD4_Final' has been explicitly marked deprecated here
extern int CC_MD4_Final(unsigned char *md, CC_MD4_CTX *c)
           ^
3 warnings generated.
  CC       libcurl_la-multi.lo
  CC       libcurl_la-netrc.lo
  CC       libcurl_la-nonblock.lo
  CC       libcurl_la-noproxy.lo
  CC       libcurl_la-openldap.lo
md5.c:180:7: warning: 'CC_MD5_Init' is deprecated: first deprecated in iOS 13.0 - This function is cryptographically broken and should not be used in security contexts. Clients should migrate to SHA256 (or stronger). [-Wdeprecated-declarations]
  if(!CC_MD5_Init(ctx))
      ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/include/CommonCrypto/CommonDigest.h:133:12: note: 'CC_MD5_Init' has been explicitly marked deprecated here
extern int CC_MD5_Init(CC_MD5_CTX *c)
           ^
md5.c:190:3: warning: 'CC_MD5_Update' is deprecated: first deprecated in iOS 13.0 - This function is cryptographically broken and should not be used in security contexts. Clients should migrate to SHA256 (or stronger). [-Wdeprecated-declarations]
  CC_MD5_Update(ctx, input, inputLen);
  ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/include/CommonCrypto/CommonDigest.h:136:12: note: 'CC_MD5_Update' has been explicitly marked deprecated here
extern int CC_MD5_Update(CC_MD5_CTX *c, const void *data, CC_LONG len)
           ^
md5.c:195:3: warning: 'CC_MD5_Final' is deprecated: first deprecated in iOS 13.0 - This function is cryptographically broken and should not be used in security contexts. Clients should migrate to SHA256 (or stronger). [-Wdeprecated-declarations]
  CC_MD5_Final(digest, ctx);
  ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/include/CommonCrypto/CommonDigest.h:139:12: note: 'CC_MD5_Final' has been explicitly marked deprecated here
extern int CC_MD5_Final(unsigned char *md, CC_MD5_CTX *c)

vtls/sectransp.c:1196:7: warning: 'CFURLCreateDataAndPropertiesFromResource' is deprecated: first deprecated in iOS 7.0 - For resource data, use the CFReadStream API. For file resource properties, use CFURLCopyResourcePropertiesForKeys. [-Wdeprecated-declarations]
      CFURLCreateDataAndPropertiesFromResource(NULL,
      ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURLAccess.h:52:9: note: 'CFURLCreateDataAndPropertiesFromResource' has been explicitly marked deprecated here
Boolean CFURLCreateDataAndPropertiesFromResource(CFAllocatorRef alloc, CFURLRef url, CFDataRef *resourceData, CFDictionaryRef *properties, CFArrayRef desiredProperties, SInt32 *errorCode) API_DEPRECATED("For resource data, use the CFReadStream API. For file resource properties, use CFURLCopyResourcePropertiesForKeys.", macos(10.0,10.9), ios(2.0,7.0), watchos(2.0,2.0), tvos(9.0,9.0));
        ^
vtls/sectransp.c:1309:20: warning: 'kTLSProtocol1' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
      *darwinver = kTLSProtocol1;
                   ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:157:5: note: 'kTLSProtocol1' has been explicitly marked deprecated here
    kTLSProtocol1 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 4,
    ^
vtls/sectransp.c:1312:20: warning: 'kTLSProtocol11' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
      *darwinver = kTLSProtocol11;
                   ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:158:5: note: 'kTLSProtocol11' has been explicitly marked deprecated here
    kTLSProtocol11 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 7,
    ^
vtls/sectransp.c:1315:20: warning: 'kTLSProtocol12' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
      *darwinver = kTLSProtocol12;
                   ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:159:5: note: 'kTLSProtocol12' has been explicitly marked deprecated here
    kTLSProtocol12 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 8,
    ^
vtls/sectransp.c:1321:22: warning: 'kTLSProtocol13' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
        *darwinver = kTLSProtocol13;
                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:161:5: note: 'kTLSProtocol13' has been explicitly marked deprecated here
    kTLSProtocol13 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 10,
    ^
vtls/sectransp.c:1374:6: warning: 'SSLSetProtocolVersionMax' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  if(SSLSetProtocolVersionMax) {
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:494:1: note: 'SSLSetProtocolVersionMax' has been explicitly marked deprecated here
SSLSetProtocolVersionMax  (SSLContextRef      context,
^
vtls/sectransp.c:1375:34: warning: 'kTLSProtocol1' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
    SSLProtocol darwin_ver_min = kTLSProtocol1;
                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:157:5: note: 'kTLSProtocol1' has been explicitly marked deprecated here
    kTLSProtocol1 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 4,
    ^
vtls/sectransp.c:1376:34: warning: 'kTLSProtocol1' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
    SSLProtocol darwin_ver_max = kTLSProtocol1;
                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:157:5: note: 'kTLSProtocol1' has been explicitly marked deprecated here
    kTLSProtocol1 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 4,
    ^
vtls/sectransp.c:1390:11: warning: 'SSLSetProtocolVersionMin' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    (void)SSLSetProtocolVersionMin(backend->ssl_ctx, darwin_ver_min);
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:458:1: note: 'SSLSetProtocolVersionMin' has been explicitly marked deprecated here
SSLSetProtocolVersionMin  (SSLContextRef      context,
^
vtls/sectransp.c:1391:11: warning: 'SSLSetProtocolVersionMax' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    (void)SSLSetProtocolVersionMax(backend->ssl_ctx, darwin_ver_max);
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:494:1: note: 'SSLSetProtocolVersionMax' has been explicitly marked deprecated here
SSLSetProtocolVersionMax  (SSLContextRef      context,
^
vtls/sectransp.c:1475:9: warning: 'SSLGetNumberSupportedCiphers' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  err = SSLGetNumberSupportedCiphers(ssl_ctx, &all_ciphers_count);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:818:1: note: 'SSLGetNumberSupportedCiphers' has been explicitly marked deprecated here
SSLGetNumberSupportedCiphers (SSLContextRef                     context,
^
vtls/sectransp.c:1492:9: warning: 'SSLGetSupportedCiphers' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  err = SSLGetSupportedCiphers(ssl_ctx, all_ciphers,
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:832:1: note: 'SSLGetSupportedCiphers' has been explicitly marked deprecated here
SSLGetSupportedCiphers           (SSLContextRef                 context,
^
vtls/sectransp.c:1514:9: warning: 'SSLSetEnabledCiphers' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  err = SSLSetEnabledCiphers(ssl_ctx, allowed_ciphers,
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:865:1: note: 'SSLSetEnabledCiphers' has been explicitly marked deprecated here
SSLSetEnabledCiphers            (SSLContextRef                  context,
^
vtls/sectransp.c:1617:9: warning: 'SSLSetEnabledCiphers' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  err = SSLSetEnabledCiphers(ssl_ctx, selected_ciphers, ciphers_count);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:865:1: note: 'SSLSetEnabledCiphers' has been explicitly marked deprecated here
SSLSetEnabledCiphers            (SSLContextRef                  context,
^
vtls/sectransp.c:1656:6: warning: 'SSLCreateContext' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  if(SSLCreateContext) {  /* use the newer API if available */
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:316:1: note: 'SSLCreateContext' has been explicitly marked deprecated here
SSLCreateContext(CFAllocatorRef __nullable alloc, SSLProtocolSide protocolSide, SSLConnectionType connectionType)
^
vtls/sectransp.c:1659:24: warning: 'SSLCreateContext' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    backend->ssl_ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType);
                       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:316:1: note: 'SSLCreateContext' has been explicitly marked deprecated here
SSLCreateContext(CFAllocatorRef __nullable alloc, SSLProtocolSide protocolSide, SSLConnectionType connectionType)
^
vtls/sectransp.c:1659:47: warning: 'kSSLClientSide' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
    backend->ssl_ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType);
                                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:218:5: note: 'kSSLClientSide' has been explicitly marked deprecated here
    kSSLClientSide CF_ENUM_DEPRECATED(10_2, 10_15, 2_0, 13_0)
    ^
vtls/sectransp.c:1659:63: warning: 'kSSLStreamType' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
    backend->ssl_ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType);
                                                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:223:5: note: 'kSSLStreamType' has been explicitly marked deprecated here
    kSSLStreamType CF_ENUM_DEPRECATED(10_2, 10_15, 2_0, 13_0),
    ^
vtls/sectransp.c:1690:6: warning: 'SSLSetProtocolVersionMax' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  if(SSLSetProtocolVersionMax) {
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:494:1: note: 'SSLSetProtocolVersionMax' has been explicitly marked deprecated here
SSLSetProtocolVersionMax  (SSLContextRef      context,
^
vtls/sectransp.c:1693:13: warning: 'SSLSetProtocolVersionMin' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
      (void)SSLSetProtocolVersionMin(backend->ssl_ctx, kTLSProtocol1);
            ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:458:1: note: 'SSLSetProtocolVersionMin' has been explicitly marked deprecated here
SSLSetProtocolVersionMin  (SSLContextRef      context,
^
vtls/sectransp.c:1693:56: warning: 'kTLSProtocol1' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
      (void)SSLSetProtocolVersionMin(backend->ssl_ctx, kTLSProtocol1);
                                                       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:157:5: note: 'kTLSProtocol1' has been explicitly marked deprecated here
    kTLSProtocol1 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 4,
    ^
vtls/sectransp.c:1696:15: warning: 'SSLSetProtocolVersionMax' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
        (void)SSLSetProtocolVersionMax(backend->ssl_ctx, kTLSProtocol13);
              ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:494:1: note: 'SSLSetProtocolVersionMax' has been explicitly marked deprecated here
SSLSetProtocolVersionMax  (SSLContextRef      context,
^
vtls/sectransp.c:1696:58: warning: 'kTLSProtocol13' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
        (void)SSLSetProtocolVersionMax(backend->ssl_ctx, kTLSProtocol13);
                                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:161:5: note: 'kTLSProtocol13' has been explicitly marked deprecated here
    kTLSProtocol13 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 10,
    ^
vtls/sectransp.c:1699:15: warning: 'SSLSetProtocolVersionMax' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
        (void)SSLSetProtocolVersionMax(backend->ssl_ctx, kTLSProtocol12);
              ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:494:1: note: 'SSLSetProtocolVersionMax' has been explicitly marked deprecated here
SSLSetProtocolVersionMax  (SSLContextRef      context,
^
vtls/sectransp.c:1699:58: warning: 'kTLSProtocol12' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
        (void)SSLSetProtocolVersionMax(backend->ssl_ctx, kTLSProtocol12);
                                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:159:5: note: 'kTLSProtocol12' has been explicitly marked deprecated here
    kTLSProtocol12 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 8,
    ^
vtls/sectransp.c:1814:13: warning: 'SSLSetALPNProtocols' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
      err = SSLSetALPNProtocols(backend->ssl_ctx, alpnArr);
            ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1332:1: note: 'SSLSetALPNProtocols' has been explicitly marked deprecated here
SSLSetALPNProtocols         (SSLContextRef      context,
^
vtls/sectransp.c:1882:13: warning: 'SSLSetCertificate' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
      err = SSLSetCertificate(backend->ssl_ctx, certs);
            ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:637:1: note: 'SSLSetCertificate' has been explicitly marked deprecated here
SSLSetCertificate                       (SSLContextRef          context,
^
vtls/sectransp.c:1945:6: warning: 'SSLSetSessionOption' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  if(SSLSetSessionOption) {
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:384:1: note: 'SSLSetSessionOption' has been explicitly marked deprecated here
SSLSetSessionOption                     (SSLContextRef          context,
^
vtls/sectransp.c:1949:11: warning: 'SSLSetSessionOption' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    err = SSLSetSessionOption(backend->ssl_ctx,
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:384:1: note: 'SSLSetSessionOption' has been explicitly marked deprecated here
SSLSetSessionOption                     (SSLContextRef          context,
^
vtls/sectransp.c:1950:31: warning: 'kSSLSessionOptionBreakOnServerAuth' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
                              kSSLSessionOptionBreakOnServerAuth,
                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:99:2: note: 'kSSLSessionOptionBreakOnServerAuth' has been explicitly marked deprecated here
        kSSLSessionOptionBreakOnServerAuth CF_ENUM_DEPRECATED(10_2, 10_15, 2_0, 13_0) = 0,
        ^
vtls/sectransp.c:1997:11: warning: 'SSLSetPeerDomainName' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    err = SSLSetPeerDomainName(backend->ssl_ctx, snihost, snilen);
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:686:1: note: 'SSLSetPeerDomainName' has been explicitly marked deprecated here
SSLSetPeerDomainName            (SSLContextRef          context,
^
vtls/sectransp.c:2034:6: warning: 'SSLSetSessionOption' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  if(SSLSetSessionOption) {
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:384:1: note: 'SSLSetSessionOption' has been explicitly marked deprecated here
SSLSetSessionOption                     (SSLContextRef          context,
^
vtls/sectransp.c:2035:5: warning: 'SSLSetSessionOption' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    SSLSetSessionOption(backend->ssl_ctx, kSSLSessionOptionSendOneByteRecord,
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:384:1: note: 'SSLSetSessionOption' has been explicitly marked deprecated here
SSLSetSessionOption                     (SSLContextRef          context,
^
vtls/sectransp.c:2035:43: warning: 'kSSLSessionOptionSendOneByteRecord' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
    SSLSetSessionOption(backend->ssl_ctx, kSSLSessionOptionSendOneByteRecord,
                                          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:123:5: note: 'kSSLSessionOptionSendOneByteRecord' has been explicitly marked deprecated here
    kSSLSessionOptionSendOneByteRecord CF_ENUM_DEPRECATED(10_2, 10_15, 2_0, 13_0) = 4,
    ^
vtls/sectransp.c:2037:5: warning: 'SSLSetSessionOption' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    SSLSetSessionOption(backend->ssl_ctx, kSSLSessionOptionFalseStart,
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:384:1: note: 'SSLSetSessionOption' has been explicitly marked deprecated here
SSLSetSessionOption                     (SSLContextRef          context,
^
vtls/sectransp.c:2037:43: warning: 'kSSLSessionOptionFalseStart' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
    SSLSetSessionOption(backend->ssl_ctx, kSSLSessionOptionFalseStart,
                                          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:117:5: note: 'kSSLSessionOptionFalseStart' has been explicitly marked deprecated here
    kSSLSessionOptionFalseStart CF_ENUM_DEPRECATED(10_2, 10_15, 2_0, 13_0) = 3,
    ^
vtls/sectransp.c:2051:13: warning: 'SSLSetPeerID' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
      err = SSLSetPeerID(backend->ssl_ctx, ssl_sessionid, ssl_sessionid_len);
            ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1285:1: note: 'SSLSetPeerID' has been explicitly marked deprecated here
SSLSetPeerID                            (SSLContextRef          context,
^
vtls/sectransp.c:2071:13: warning: 'SSLSetPeerID' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
      err = SSLSetPeerID(backend->ssl_ctx, ssl_sessionid, ssl_sessionid_len);
            ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1285:1: note: 'SSLSetPeerID' has been explicitly marked deprecated here
SSLSetPeerID                            (SSLContextRef          context,
^
vtls/sectransp.c:2088:9: warning: 'SSLSetIOFuncs' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  err = SSLSetIOFuncs(backend->ssl_ctx, bio_cf_in_read, bio_cf_out_write);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:418:1: note: 'SSLSetIOFuncs' has been explicitly marked deprecated here
SSLSetIOFuncs                           (SSLContextRef          context,
^
vtls/sectransp.c:2094:9: warning: 'SSLSetConnection' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  err = SSLSetConnection(backend->ssl_ctx, cf);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:657:1: note: 'SSLSetConnection' has been explicitly marked deprecated here
SSLSetConnection                        (SSLContextRef                  context,
^
vtls/sectransp.c:2302:9: warning: 'SSLCopyPeerTrust' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  ret = SSLCopyPeerTrust(ctx, &trust);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1261:1: note: 'SSLCopyPeerTrust' has been explicitly marked deprecated here
SSLCopyPeerTrust                        (SSLContextRef          context,
^
vtls/sectransp.c:2325:9: warning: 'SecTrustEvaluate' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
  ret = SecTrustEvaluate(trust, &trust_eval);
        ^~~~~~~~~~~~~~~~
        SecTrustEvaluateWithError
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrust.h:359:10: note: 'SecTrustEvaluate' has been explicitly marked deprecated here
OSStatus SecTrustEvaluate(SecTrustRef trust, SecTrustResultType *result)
         ^
vtls/sectransp.c:2423:11: warning: 'SSLCopyPeerTrust' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    ret = SSLCopyPeerTrust(ctx, &trust);
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1261:1: note: 'SSLCopyPeerTrust' has been explicitly marked deprecated here
SSLCopyPeerTrust                        (SSLContextRef          context,
^
vtls/sectransp.c:2525:9: warning: 'SSLHandshake' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  err = SSLHandshake(backend->ssl_ctx);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1641:1: note: 'SSLHandshake' has been explicitly marked deprecated here
SSLHandshake                            (SSLContextRef          context)
^
vtls/sectransp.c:2762:11: warning: 'SSLGetNegotiatedCipher' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    (void)SSLGetNegotiatedCipher(backend->ssl_ctx, &cipher);
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1314:1: note: 'SSLGetNegotiatedCipher' has been explicitly marked deprecated here
SSLGetNegotiatedCipher          (SSLContextRef          context,
^
vtls/sectransp.c:2763:11: warning: 'SSLGetNegotiatedProtocolVersion' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    (void)SSLGetNegotiatedProtocolVersion(backend->ssl_ctx, &protocol);
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:803:1: note: 'SSLGetNegotiatedProtocolVersion' has been explicitly marked deprecated here
SSLGetNegotiatedProtocolVersion         (SSLContextRef          context,
^
vtls/sectransp.c:2765:12: warning: 'kSSLProtocol2' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
      case kSSLProtocol2:
           ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:164:5: note: 'kSSLProtocol2' has been explicitly marked deprecated here
    kSSLProtocol2 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 1,
    ^
vtls/sectransp.c:2769:12: warning: 'kSSLProtocol3' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
      case kSSLProtocol3:
           ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:165:5: note: 'kSSLProtocol3' has been explicitly marked deprecated here
    kSSLProtocol3 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 2,
    ^
vtls/sectransp.c:2773:12: warning: 'kTLSProtocol1' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
      case kTLSProtocol1:
           ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:157:5: note: 'kTLSProtocol1' has been explicitly marked deprecated here
    kTLSProtocol1 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 4,
    ^
vtls/sectransp.c:2778:12: warning: 'kTLSProtocol11' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
      case kTLSProtocol11:
           ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:158:5: note: 'kTLSProtocol11' has been explicitly marked deprecated here
    kTLSProtocol11 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 7,
    ^
vtls/sectransp.c:2782:12: warning: 'kTLSProtocol12' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
      case kTLSProtocol12:
           ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:159:5: note: 'kTLSProtocol12' has been explicitly marked deprecated here
    kTLSProtocol12 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 8,
    ^
vtls/sectransp.c:2788:12: warning: 'kTLSProtocol13' is deprecated: first deprecated in iOS 13.0 [-Wdeprecated-declarations]
      case kTLSProtocol13:
           ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:161:5: note: 'kTLSProtocol13' has been explicitly marked deprecated here
    kTLSProtocol13 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 10,
    ^
vtls/sectransp.c:2803:15: warning: 'SSLCopyALPNProtocols' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
        err = SSLCopyALPNProtocols(backend->ssl_ctx, &alpnArr);
              ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1354:1: note: 'SSLCopyALPNProtocols' has been explicitly marked deprecated here
SSLCopyALPNProtocols        (SSLContextRef      context,
^
vtls/sectransp.c:2910:9: warning: 'SSLCopyPeerTrust' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  err = SSLCopyPeerTrust(backend->ssl_ctx, &trust);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1261:1: note: 'SSLCopyPeerTrust' has been explicitly marked deprecated here
SSLCopyPeerTrust                        (SSLContextRef          context,
^
vtls/sectransp.c:3143:11: warning: 'SSLClose' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    (void)SSLClose(backend->ssl_ctx);
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1731:1: note: 'SSLClose' has been explicitly marked deprecated here
SSLClose                                        (SSLContextRef          context)
^
vtls/sectransp.c:3145:8: warning: 'SSLCreateContext' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    if(SSLCreateContext)
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:316:1: note: 'SSLCreateContext' has been explicitly marked deprecated here
SSLCreateContext(CFAllocatorRef __nullable alloc, SSLProtocolSide protocolSide, SSLConnectionType connectionType)
^
vtls/sectransp.c:3249:11: warning: 'SSLGetBufferedReadSize' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    err = SSLGetBufferedReadSize(backend->ssl_ctx, &buffer);
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1705:1: note: 'SSLGetBufferedReadSize' has been explicitly marked deprecated here
SSLGetBufferedReadSize          (SSLContextRef context,
^
vtls/sectransp.c:3291:6: warning: 'SSLSetSessionOption' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  if(SSLSetSessionOption)
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:384:1: note: 'SSLSetSessionOption' has been explicitly marked deprecated here
SSLSetSessionOption                     (SSLContextRef          context,
^
vtls/sectransp.c:3327:11: warning: 'SSLWrite' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    err = SSLWrite(backend->ssl_ctx, NULL, 0UL, &processed);
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1670:1: note: 'SSLWrite' has been explicitly marked deprecated here
SSLWrite                                        (SSLContextRef          context,
^
vtls/sectransp.c:3346:11: warning: 'SSLWrite' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
    err = SSLWrite(backend->ssl_ctx, mem, len, &processed);
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1670:1: note: 'SSLWrite' has been explicitly marked deprecated here
SSLWrite                                        (SSLContextRef          context,
^
vtls/sectransp.c:3381:9: warning: 'SSLRead' is deprecated: first deprecated in iOS 13.0 - No longer supported. Use Network.framework. [-Wdeprecated-declarations]
  err = SSLRead(backend->ssl_ctx, buf, buffersize, &processed);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h:1689:1: note: 'SSLRead' has been explicitly marked deprecated here
SSLRead                                         (SSLContextRef          context,
^
61 warnings generated.

I expected the following

No warnings in the compilation.

curl/libcurl version

Compiling version 8.0.1 (probably happens with previous versions too)

operating system

Chip: Apple M1 Max
macOS 13.3.1 (a) (22E772610a)
Xcode: Version 14.3 (14E222b)
Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64

@vszakats
Copy link
Member

vszakats commented May 10, 2023

Happens with macOS builds as well. They can be silenced with the C flag -Wno-deprecated-declarations as a temporary solution.

@vszakats vszakats added the build label May 10, 2023
@bagder
Copy link
Member

bagder commented May 10, 2023

temporary solution.

I'm not very fluent in macOS specifics, but "Use Network.framework." seems to imply that a rather major effort would be necessary to address these in other ways than just inhibiting the warning messages. I don't see this happening anytime soon.

@vszakats
Copy link
Member

Indeed, it seems Apple deprecated SecureTransport as-is:
https://developer.apple.com/documentation/security/secure_transport

...I stand corrected with "temporary"!

@MarcelRaad
Copy link
Member

MarcelRaad commented May 10, 2023

For the warnings in md4.c and md5.c, we don't use the system functions anymore for recent macOS since 2998749 because of the possible warnings-as-errors. We could do the same for iOS.

Also, we can probably include MD4 support only if USE_CURL_NTLM_CORE is enabled instead of if CURL_DISABLE_CRYPTO_AUTH is disabled? That's the condition for its only usage in curl_ntlm_core.c AFAICS.

For SecureTransport, the only actionable warning seems to be this one:

vtls/sectransp.c:1196:7: warning: 'CFURLCreateDataAndPropertiesFromResource' is deprecated: first deprecated in iOS 7.0 - For resource data, use the CFReadStream API. For file resource properties, use CFURLCopyResourcePropertiesForKeys. [-Wdeprecated-declarations]
      CFURLCreateDataAndPropertiesFromResource(NULL,
      ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURLAccess.h:52:9: note: 'CFURLCreateDataAndPropertiesFromResource' has been explicitly marked deprecated here
Boolean CFURLCreateDataAndPropertiesFromResource(CFAllocatorRef alloc, CFURLRef url, CFDataRef *resourceData, CFDictionaryRef *properties, CFArrayRef desiredProperties, SInt32 *errorCode) API_DEPRECATED("For resource data, use the CFReadStream API. For file resource properties, use CFURLCopyResourcePropertiesForKeys.", macos(10.0,10.9), ios(2.0,7.0), watchos(2.0,2.0), tvos(9.0,9.0));
        ^

If you don't want functions deprecated by Apple to be used, don't choose a framework deprecated by Apple as an SSL backend.

@vszakats
Copy link
Member

vszakats commented May 10, 2023

Turns out the macOS case I mentioned is not related to SecureTransport, but to ldap (also deprecated as-is, so it's best to suppress or avoid just like SecureTransport) and sprintf:

after cmake . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl:

[ 38%] Building C object lib/CMakeFiles/libcurl.dir/ldap.c.o
./curl/lib/ldap.c:326:8: warning: 'ldap_url_parse' is deprecated: first deprecated in macOS 10.11 - use OpenDirectory Framework [-Wdeprecated-declarations]
  rc = ldap_url_parse(data->state.url, &ludp);
       ^
[...a lot of the same kind...]

[ 38%] Building C object lib/CMakeFiles/libcurl.dir/mprintf.c.o
./curl/lib/mprintf.c:975:10: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
        (sprintf)(work, formatbuf, p->data.dnum);
         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
1 warning generated.

MarcelRaad added a commit to MarcelRaad/curl that referenced this issue May 11, 2023
Its only usage in curl_ntlm_core.c is guarded by `USE_CURL_NTLM_CORE`,
so let's use this here too.

Ref: curl#11098
MarcelRaad added a commit to MarcelRaad/curl that referenced this issue May 11, 2023
They are marked as deprecated in iOS 13.0, which might result in
warnings-as-errors.

Also, use `*_MIN_REQUIRED` instead of `*_MIN_ALLOWED`, which seems to
be what's currently used.

Ref: curl#11098
MarcelRaad added a commit to MarcelRaad/curl that referenced this issue May 11, 2023
Its only usage in curl_ntlm_core.c is guarded by `USE_CURL_NTLM_CORE`,
so let's use this here too.

Ref: curl#11098
Closes curl#11102
MarcelRaad added a commit to MarcelRaad/curl that referenced this issue May 11, 2023
They are marked as deprecated in iOS 13.0, which might result in
warnings-as-errors.

Also, use `*_MIN_REQUIRED` instead of `*_MIN_ALLOWED`, which seems to
be what's currently used.

Ref: curl#11098
Closes curl#11102
MarcelRaad added a commit to MarcelRaad/curl that referenced this issue May 11, 2023
Its only usage in curl_ntlm_core.c is guarded by `USE_CURL_NTLM_CORE`,
so let's use this here too.

Ref: curl#11098
Closes curl#11102
MarcelRaad added a commit to MarcelRaad/curl that referenced this issue May 11, 2023
They are marked as deprecated in iOS 13.0, which might result in
warnings-as-errors.

Also, use `*_MIN_REQUIRED` instead of `*_MIN_ALLOWED`, which seems to
be what's currently used.

Bug: curl#11098
Closes curl#11102
@MarcelRaad
Copy link
Member

The md4/md5 part should be addressed by #11102.

I cannot fix the CFURLCreateDataAndPropertiesFromResource usage myself as I currently don't have an Apple development environment, so I used "Bug:" instead of "Closes" to reference this issue so that it doesn't get automatically closed.

@jnavarrom
Copy link
Author

Thank you for checking this and for the great efforts 🙌 .

Nice to see that you addressed "This function is cryptographically broken and should not be used in security contexts" warnings 💪.

If you don't want functions deprecated by Apple to be used, don't choose a framework deprecated by Apple as an SSL backend.

I understand. I can use Secure Transport as SSL backend (or other SSL supported library: OpenSSL, GnuTLS, NSS, wolfSSL, mbedTLS, Schannel) but I can't use "Netwrok.Framework" because it is not supported as SSL backend library and it is something not planned to add in a near future.

Thanks again

MarcelRaad added a commit that referenced this issue May 13, 2023
Its only usage in curl_ntlm_core.c is guarded by `USE_CURL_NTLM_CORE`,
so let's use this here too.

Ref: #11098
Closes #11102
MarcelRaad added a commit that referenced this issue May 13, 2023
They are marked as deprecated in iOS 13.0, which might result in
warnings-as-errors.

Also, use `*_MIN_REQUIRED` instead of `*_MIN_ALLOWED`, which seems to
be what's currently used.

Bug: #11098
Closes #11102
bch pushed a commit to bch/curl that referenced this issue Jul 19, 2023
Its only usage in curl_ntlm_core.c is guarded by `USE_CURL_NTLM_CORE`,
so let's use this here too.

Ref: curl#11098
Closes curl#11102
bch pushed a commit to bch/curl that referenced this issue Jul 19, 2023
They are marked as deprecated in iOS 13.0, which might result in
warnings-as-errors.

Also, use `*_MIN_REQUIRED` instead of `*_MIN_ALLOWED`, which seems to
be what's currently used.

Bug: curl#11098
Closes curl#11102
@bagder
Copy link
Member

bagder commented Jul 23, 2023

I see no effort from anyone to fix this so I'm suggesting we just note this as a known bug and move on.

@bagder
Copy link
Member

bagder commented Jul 27, 2023

This issue is mentioned in KNIOWN_BUGS now: https://curl.se/docs/knownbugs.html#building_for_old_macOS_fails_wit - this is deemed basically as duplicate of #11441

@bagder bagder closed this as completed Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants