0
iOS 10에서 상호 인증을 사용 중입니다. if 문을 사용하여 상호 인증이 올바르게 작동합니다.NSURLAuthenticationMethodClientCertificate에 문제가있는 경우
NSURLAuthenticationMethodServerTrust
강제 응답 반환하는 방법 NSURLAuthenticationMethodClientCertificate : 아이폰 OS 10
NSURLProtectionSpace* protectionSpace = challenge.protectionSpace;
NSURLAuthenticationMethodClientCertificate
와 응답 돌아가서 문제에
-(void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
if ([protectionSpace authenticationMethod] == NSURLAuthenticationMethodServerTrust) {
// do something
} else if ([protectionSpace authenticationMethod] == NSURLAuthenticationMethodClientCertificate) {
// Do something
}
}
는 아이폰 OS (11)에 응답 수익입니다 먼저 대신 NSURLAuthenticationMethodServerTrust을 입력하십시오.
감사의 말 :