Merge pull request #1993 from minorblend/af_1.x
call SecTrustEvaluate before calling SecTrustGetCertificateCount
This commit is contained in:
commit
55ef458688
1 changed files with 1 additions and 0 deletions
|
|
@ -592,6 +592,7 @@ willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challe
|
||||||
SecTrustRef serverTrust = challenge.protectionSpace.serverTrust;
|
SecTrustRef serverTrust = challenge.protectionSpace.serverTrust;
|
||||||
|
|
||||||
SecPolicyRef policy = SecPolicyCreateBasicX509();
|
SecPolicyRef policy = SecPolicyCreateBasicX509();
|
||||||
|
SecTrustEvaluate(serverTrust, NULL);
|
||||||
CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);
|
CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);
|
||||||
NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:certificateCount];
|
NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:certificateCount];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue