marinofaggiana 4 年之前
父节点
当前提交
93ccdf96eb
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      iOSClient/Networking/NCNetworking.swift

+ 4 - 0
iOSClient/Networking/NCNetworking.swift

@@ -121,9 +121,13 @@ import Queuer
     }
     
     func authenticationChallenge(_ challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
+        NCCommunicationCommon.shared.writeLog("[LOG] NCNteworkink.authenticationChallenge")
+
         if checkTrustedChallenge(challenge: challenge, directoryCertificate: CCUtility.getDirectoryCerificates()) {
+            NCCommunicationCommon.shared.writeLog("[LOG] NCNteworkink.authenticationChallenge TRUST")
             completionHandler(URLSession.AuthChallengeDisposition.useCredential, URLCredential.init(trust: challenge.protectionSpace.serverTrust!))
         } else {
+            NCCommunicationCommon.shared.writeLog("[LOG] NCNteworkink.authenticationChallenge ERROR TRUST")
             completionHandler(URLSession.AuthChallengeDisposition.performDefaultHandling, nil)
         }
     }