浏览代码

For SSL validation, use default system validation until custom behavior is properly implemented.

Michael Thole 10 年之前
父节点
当前提交
63a00ae700
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      Source/Alamofire.swift

+ 6 - 6
Source/Alamofire.swift

@@ -741,17 +741,17 @@ public class Request {
                 if challenge.previousFailureCount > 0 {
                     disposition = .CancelAuthenticationChallenge
                 } else {
-                    // TODO: Incorporate Trust Evaluation & TLS Chain Validation
 
                     switch challenge.protectionSpace.authenticationMethod! {
                     case NSURLAuthenticationMethodServerTrust:
-                        credential = NSURLCredential(forTrust: challenge.protectionSpace.serverTrust)
+                        // TODO: Incorporate custom Trust Evaluation & TLS Chain Validation
+                        // For now, fall back on default system SSL validation.
+                        break
                     default:
                         credential = self.credential ?? session.configuration.URLCredentialStorage?.defaultCredentialForProtectionSpace(challenge.protectionSpace)
-                    }
-
-                    if credential != nil {
-                        disposition = .UseCredential
+                        if credential != nil {
+                            disposition = .UseCredential
+                        }
                     }
                 }
             }