Error to connect a socket with SSL in the iOS 9.3!

I’m trying to conect in my server that work only with SSL using: “CFStreamPropertySSLContext” and “SSLSetProtocolVersionMin(context, kSSLProtocol3)”

And retorn this error:
Undefined symbols for architecture armv7:
“_kCFStreamPropertySSLContext”, referenced from:
-[JCAMConnectionManager openSocketWith:] in JCAMConnectionManager.o
“_SSLSetProtocolVersionMin”, referenced from:
-[JCAMConnectionManager openSocketWith:] in JCAMConnectionManager.o
ld: symbol(s) not found for architecture armv7

Exist anouther form to conect using SSL in the iOS 9.3.2 ?

Thank you very much.

SSLSetProtocolVersionMin requires @import Security - without having tried it I would guess you need to add the framework Security.framework?

Try adding it in your target’s Build Phases → Link Binary with Libraries list by clicking the ‘+’ and then adding Security.framework.

You may also need CFNetwork.framework for CFStreamPropertySSLContext.

1 Like

Hello AEberbach!

Now this compiling. Thank you very much! Very useful for your help.

But the time to connect the connection is being refused. You have another example of how I can do this SSL connection? (I’ve done “App Transport Security” settings to work on iOS 9).

Again thank you very much.

What is your actual error message? Are you getting a HTTP response code or not even that far?

Thanks again for your help.

Ok, I’m trying to connect via socket on my server that communicates only SSL through my app on iOS 9.3.2. Until version 9.1 (I’m sure) could compile normally and now this new version of iOS does not.

The time I open the socket of the following message in xCode: “2016-06-03 15:50:28.385 Active Mobile[766:247998] ERROR 61: The operation couldn’t be completed. Connection refused”

this is the code I use to work with SSL that worked in 9.1 and now in 9.3.2 not:
SSLContextRef context = (SSLContextRef) CFReadStreamCopyProperty(
(__bridge CFReadStreamRef) _inputStream,
kCFStreamPropertySSLContext
);
assert(context != NULL);
OSStatus success = SSLSetProtocolVersionMin(context, kSSLProtocol3) == errSecSuccess;
assert(success);
CFRelease(context);

Thank you very much!

Now it worked AEberbach. I connection tests and found an error in the code that was using to connect, that I showed you in the last post. Thank you very much!

That’s great - can you say what the error was? It would be good if someone searching for an answer to a similar question could find the answer at the same time they find the question here :slight_smile: