curl-library
Can't get internals pointer on iOS
Date: Tue, 26 Apr 2016 15:50:48 +0300
Hello!
Using iOS 9.3.1 on iPhone 5 and 6, Mac OS X 10.11.4, XCode 7.3, libcurl
7.47.1
libcurl is build with this thing:
https://github.com/sinofool/build-libcurl-ios
build without OpenSSL, with native DarwinSSL
libz is linked to project additionaly to libcurl (as required)
Now i have a very simple test project (but on complex business rest task),
i am using curl_easy*** API with many self-signed certs.
At a glance everything is working fine! I can GET, i can POST, json is
flying back-and-forth without any troubles, but i run into underlying ssl
cache troubles, when new connection use previous user ssl cert.
I try to use curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &info);
to load info in
struct curl_tlssessioninfo *info;
and get pointer to underlying ssl context and shut it.
CURLINFO_TLS_SSL_PTR is not available, but docs say they are the same for me
But no matter how i do it i can only get
curl_sslbackend backend = CURLSSLBACKEND_DARWINSSL;
and void *internals = NULL;
always NULL
Some more information on iOS TLS caching:
https://developer.apple.com/library/ios/qa/qa1727/_index.html
I cannot use anything but libcurl. Every native APIs is:
a) much much harder on my task
b) with some nasty limitations
I google, i try examples, i read api and headers, i wildly debug for week.
I tried all relevant (and irrelevant) options such as
curl_easy_setopt(curl_handle, CURLOPT_MAXCONNECTS, 1);
curl_easy_setopt(curl_handle, CURLOPT_DNS_CACHE_TIMEOUT, 0);
curl_easy_setopt(curl_handle, CURLOPT_SSL_SESSIONID_CACHE, 0);
curl_easy_setopt(curl_handle, CURLOPT_COOKIELIST, "ALL");
curl_easy_setopt(curl_handle, CURLOPT_RTSP_SESSION_ID, NULL);
curl_easy_setopt(curl_handle, CURLOPT_FRESH_CONNECT, 1);
curl_easy_setopt(curl_handle, CURLOPT_FORBID_REUSE, 1);
No result.
Help. How should i get pointer to SSLContext?
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-04-26