On 14 Oct 2015, at 08:44, Yulia Bensman <ybens...@interwise.com> wrote:

> So, the question is: if there any way to receive a notification for NSStream, 
> when SSL handshake succeeded(not only TCP connection established)?

I generally handle this by waiting for the first data event (.HasSpaceAvailable 
or .HasBytesAvailable).  By the time you get that event the TLS handshake is 
fully up and you can interrogate its state as you wish (typically using the 
kCFStreamPropertySSLPeerTrust and kCFStreamPropertySSLContext properties).  The 
TLSTool sample code shows this in practice.

<https://developer.apple.com/library/mac/samplecode/SC1236/>

Look in "TLSToolCommon.m" for the handling of the haveSentConnectionDidOpen 
property.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to