call SecTrustEvaluate before calling SecTrustGetCertificateCount
SecTrustGetCertificateCount's documentation says SecTrustEvaluate must be called before calling it. Without calling it, SecTrustGetCertificateCount returns 0 in OS X 10.7.
This commit is contained in:
parent
d74e568cf2
commit
5c237a66eb
1 changed files with 1 additions and 0 deletions
|
|
@ -592,6 +592,7 @@ willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challe
|
|||
SecTrustRef serverTrust = challenge.protectionSpace.serverTrust;
|
||||
|
||||
SecPolicyRef policy = SecPolicyCreateBasicX509();
|
||||
SecTrustEvaluate(serverTrust, NULL);
|
||||
CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);
|
||||
NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:certificateCount];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue