зеркало из https://github.com/github/AFNetworking.git
Restore previous method organization
Sorry @keithduncan, I just wanna make sure people can spot the difference between old and new.
This commit is contained in:
Родитель
c0e505c0b5
Коммит
0d5dd5ba58
|
@ -579,15 +579,7 @@ willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challe
|
|||
return;
|
||||
}
|
||||
|
||||
if (![challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
|
||||
if ([challenge previousFailureCount] == 0 && self.credential != nil) {
|
||||
[[challenge sender] useCredential:self.credential forAuthenticationChallenge:challenge];
|
||||
}
|
||||
|
||||
[[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];
|
||||
return;
|
||||
}
|
||||
|
||||
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
|
||||
SecTrustRef serverTrust = challenge.protectionSpace.serverTrust;
|
||||
|
||||
SecPolicyRef policy = SecPolicyCreateBasicX509();
|
||||
|
@ -671,6 +663,13 @@ willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challe
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ([challenge previousFailureCount] == 0 && self.credential != nil) {
|
||||
[[challenge sender] useCredential:self.credential forAuthenticationChallenge:challenge];
|
||||
}
|
||||
|
||||
[[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection __unused *)connection {
|
||||
|
|
Загрузка…
Ссылка в новой задаче