Re: kCFStreamPropertySSLPeerCertificates issue
Re: kCFStreamPropertySSLPeerCertificates issue
- Subject: Re: kCFStreamPropertySSLPeerCertificates issue
- From: Kevin Yu <email@hidden>
- Date: Thu, 08 Aug 2013 08:55:12 +0800
On Aug 7, 2013, at 3:17 AM, Kevin Yu <email@hidden> wrote:
Undefined symbols for architecture i386: "_kCFStreamPropertySSLPeerCertificates", referenced from:
That symbol is in the CFNetwork framework on iOS. You need to update your target to link against that framework.
Thanks Jens, this move resolve the compile issue!
when I checked the CFSocketStream.h it said the kCFStreamPropertySSLPeerCertificates is considered deprecated in Mac OS 10.6 and later.
If you look a bit above above there in the header, you’ll see:
/* * The following properties are considered deprecated in Mac OS 10.6 and later. * * kCFStreamPropertySSLPeerCertificates: * The peer certificates are available as part of the SecTrustRef object. See <Security/SecTrust.h>
In other words, you get the kCFStreamPropertySSLPeerTrust property, cast the result to a SecTrustRef, and call SecTrustEvaluate on that. (And you’ll need to link against Security.framework.)
—Jens
So that means I should use kCFStreamPropertySSLPeerTrust to replace kCFStreamPropertySSLPeerCertificates?
Kevin
|
_______________________________________________
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