gustavogenovese / curl-android-ios

Static libcurl to be used in Android and iOS apps. Build scripts included. No Android source required
641 stars 255 forks source link

SSL link error happened #50

Closed whtank closed 6 years ago

whtank commented 6 years ago

Showing Recent Issues "_SSLGetNegotiatedProtocolVersion", referenced from:

  _darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)

"_SSLHandshake", referenced from:

  _darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)

"_SSLCopyPeerTrust", referenced from:

  _darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)

"_SecTrustSetAnchorCertificates", referenced from:

  _darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)

"_SecTrustSetAnchorCertificatesOnly", referenced from:

  _darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)

"_SSLWrite", referenced from:

  _darwinssl_send in libcurl.a(libcurl_la-darwinssl.o)

"_SecTrustEvaluate", referenced from:

  _darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)

"_SSLSetProtocolVersionMax", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_kSecClass", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_kSecReturnRef", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_kSecMatchLimit", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SecItemCopyMatching", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SecCertificateCopySubjectSummary", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

  _CopyCertSubject in libcurl.a(libcurl_la-darwinssl.o)

"_SecPKCS12Import", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLGetNegotiatedCipher", referenced from:

  _darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)

"_SSLSetPeerDomainName", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_kSecImportItemIdentity", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLSetCertificate", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SecIdentityCopyCertificate", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLSetEnabledCiphers", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SecPolicyCreateSSL", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLGetBufferedReadSize", referenced from:

  _Curl_darwinssl_data_pending in libcurl.a(libcurl_la-darwinssl.o)

"_kSecImportExportPassphrase", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLCreateContext", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLSetSessionOption", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLGetNumberSupportedCiphers", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLSetProtocolVersionMin", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLGetSessionState", referenced from:

  _Curl_darwinssl_check_cxn in libcurl.a(libcurl_la-darwinssl.o)

"_kSecMatchLimitAll", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLSetPeerID", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_kSecAttrLabel", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SecCertificateCreateWithData", referenced from:

  _append_cert_to_array in libcurl.a(libcurl_la-darwinssl.o)

"_SSLRead", referenced from:

  _darwinssl_recv in libcurl.a(libcurl_la-darwinssl.o)

"_SSLSetIOFuncs", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLGetSupportedCiphers", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_kSecMatchPolicy", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLSetConnection", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_kSecClassIdentity", referenced from:

  _darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)

"_SSLClose", referenced from:

  _Curl_darwinssl_close in libcurl.a(libcurl_la-darwinssl.o)
gustavogenovese commented 6 years ago

do you have any steps to reproduce the issue?

whtank commented 6 years ago

It works well if I use it directly in an application, however, if I build it into a .framework, it produces above link errors

gustavogenovese commented 6 years ago

Then it's probably an issue in your build/linker settings

whtank commented 6 years ago

finally got the reason: we need link 'security.framework' in our framework project, but it is not needed in single application project