Merge pull request #1993 from minorblend/af_1.x

call SecTrustEvaluate before calling SecTrustGetCertificateCount
This commit is contained in:
Mattt Thompson 2014-04-15 11:00:40 -07:00
commit 55ef458688

View file

@ -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];