     private let validateCertificateChain: Bool
     private let validateHost: Bool
 
-    public init(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) {
+    @nonobjc public init(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) {
         self.pinnedPublicKeys = publicKeys
+        self.validateCertificateChain = validateCertificateChain
+        self.validateHost = validateHost
+    }
+
+    public init(certificatesData: [Data], validateCertificateChain: Bool, validateHost: Bool) {
+        self.pinnedPublicKeys = PinPublicKeys.publicKeys(from: certificatesData)
         self.validateCertificateChain = validateCertificateChain
         self.validateHost = validateHost
     }

            SecTrustSetAnchorCertificatesOnly(serverTrust, true)
            return trustIsValid(serverTrust)
        } else {
            let serverCertificatesDataArray = certificateData(for: serverTrust)
            let pinnedCertificatesDataArray = certificateData(for: pinnedCertificates)

            for serverCertificateData in serverCertificatesDataArray {
                for pinnedCertificateData in pinnedCertificatesDataArray {

        }
        return false
    }
}

public class PinPublicKeys: NSObject, ServerTrustPolicy {
