eskimo1 from Apple Devforums responded like this:
First disable automatic trust verification using kCFStreamSSLValidatesCertificateChain.
Secondly, as soon as the thread is up and running (I usually do this in my message processing “can accept bytes” or “has access to bytes”), you will get the SecTrust object from the stream using kCFStreamPropertySSLPeerTrust and appreciate this trust for yourself. If the trust check fails, merge the stream.
source
share