                 Thread.sleep(forTimeInterval: 0.1)
             }
             switch self.evaluateResult {
-                case 0:
-                    // User decided to abort connection
-                    return false
-                case 1:
-                    // User decided to accept invalid certificate once
-                    return true
-                case 2:
-                    // User decided to accept invalid certificate and remember decision
-                    // Add certificate to storage
-                    AFRememberingSecurityPolicy.storeCertificateData(certificateData, forDomain: domain)
-                    return true
-                default:
-                    // Something went wrong, abort connection
-                    return false
+            case 0:
+                // User decided to abort connection
+                return false
+            case 1:
+                // User decided to accept invalid certificate once
+                return true
+            case 2:
+                // User decided to accept invalid certificate and remember decision
+                // Add certificate to storage
+                AFRememberingSecurityPolicy.storeCertificateData(certificateData, forDomain: domain)
+                return true
+            default:
+                // Something went wrong, abort connection
+                return false
             }
         }
         // We have no way of handling it so no access!

    init(pinningMode: AFSSLPinningMode) {
        super.init()
    }
    
    class func storeCertificateData(_ certificate: CFData?, forDomain domain: String?) {
        //    NSData *certificateData = [NSKeyedArchiver archivedDataWithRootObject:(__bridge id)(certificate)];
        let certificateData = certificate as? Data

                        Thread.sleep(forTimeInterval: 0.1)
                    }
                    switch self.evaluateResult {
                    case 0:
                        // User decided to abort connection
                        return false
                    case 1:
                        // User decided to accept invalid certificate once
                        return true
                    case 2:
                        // User decided to accept invalid certificate and remember decision
                        // Add certificate to storage
                        AFRememberingSecurityPolicy.storeCertificateData(certificateData, forDomain: domain)
                        return true
                    default:
                        // Something went wrong, abort connection
                        return false
                    }
                }
                return false
