我们的旧应用程序使用MKNetworkKit和MKNetworkOperation。
现在在iOS 7下,kSecTrustResultConfirm已经被弃用。 在MKNetworkOperation中,有这段代码:
有没有
现在在iOS 7下,kSecTrustResultConfirm已经被弃用。 在MKNetworkOperation中,有这段代码:
else if(result == kSecTrustResultConfirm) { // DEPRECATED
if(self.shouldContinueWithInvalidCertificate) {
// Cert not trusted, but user is OK with that
DLog(@"Certificate is not trusted, but self.shouldContinueWithInvalidCertificate is YES");
[challenge.sender useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust] forAuthenticationChallenge:challenge];
} else {
DLog(@"Certificate is not trusted, continuing without credentials. Might result in 401 Unauthorized");
[challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge];
}
}
有没有
kSecTrustResultConfirm
的替代品?