Before opening streams you need to set the corresponding CFStream properties . You do this by first creating a dictionary using the appropriate keys kCFStreamSSL*and corresponding values, and then calling CFWriteStreamSetProperty()to set this dictionary as a property kCFStreamPropertySSLSettings. The property must be shared between both threads in a pair of connections.
If your server is trying to negotiate an SSL connection, I believe that threads will interact in default negotiations. You may have less work than you think.
source
share