|
|
@@ -204,7 +204,14 @@
|
|
|
}
|
|
|
|
|
|
#pragma mark - NSURLSessionDataDelegate
|
|
|
-
|
|
|
+- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler{
|
|
|
+ if([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]){
|
|
|
+ if(/*[challenge.protectionSpace.host isEqualToString:@"96.75.188.41"]*/ true){
|
|
|
+ NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
|
|
|
+ completionHandler(NSURLSessionAuthChallengeUseCredential,credential);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveResponse:(NSURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition))completionHandler {
|
|
|
|
|
|
NSLog(@"Delegate recv response: %@",response);
|