草庐IT

canAuthenticateAgainstProtectionS

全部标签

iphone - 在 canAuthenticateAgainstProtectionSpace 中检查公钥

有人要求我根据canAuthenticateAgainstProtectionSpace中的已知值检查公钥(NSURLConnection的委托(delegate)回调)这是我目前所拥有的:-(BOOL)connection:(NSURLConnection*)connectioncanAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace*)protectionSpace{SecKeyRefpublicKey=SecTrustCopyPublicKey([protectionSpaceserverTrust]);NSLog(@

iOS canAuthenticateAgainstProtectionSpace 方法不是每次都调用

我正在尝试执行SSL证书验证并已实现委托(delegate)canAuthenticateAgainstProtectionSpace-(BOOL)connection:(NSURLConnection*)connectioncanAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace*)protectionSpace{OSStatusstatus=SecTrustEvaluate(protectionSpace.serverTrust,&trustResult);if(status==errSecSuccess){}else{