Re: How to use NWTCPConnectionAuthenticationDelegate for self signed certificate
Re: How to use NWTCPConnectionAuthenticationDelegate for self signed certificate
- Subject: Re: How to use NWTCPConnectionAuthenticationDelegate for self signed certificate
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Tue, 01 Dec 2015 08:02:32 +0000
On 1 Dec 2015, at 07:46, Kevin Yu <email@hidden> wrote:
> I think we can use the NWTCPConnectionAuthenticationDelegate and it’s function evaluateTrustForConnection() to do the trick, however, I did not found how to write this function in order to create a SecTrustRef and send out via completion handler.
The intent is that you create a trust object by calling SecTrustCreateWithCertificates. This takes two input parameters:
* certificates -- You get this from peerCertificateChain parameter of -evaluateTrustForConnection:peerCertificateChain:completionHandler:.
* policies -- For TLS you'd usually create this by calling SecPolicyCreateSSL.
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden