Skip to content

Instantly share code, notes, and snippets.

@davidmtamas
Created April 2, 2020 07:08
Show Gist options
  • Save davidmtamas/eb90978049797683fe8eada8c22e0b0c to your computer and use it in GitHub Desktop.
Save davidmtamas/eb90978049797683fe8eada8c22e0b0c to your computer and use it in GitHub Desktop.
public final class PublicKeyPinner {
/// Stored public key hashes
private let hashes: [String]
public init(hashes: [String]) {
self.hashes = hashes
}
/// Validates an object used to evaluate trust's certificates by comparing their public key hashes
/// to the known, trused key hashes stored in the app.
/// - Parameter serverTrust: The object used to evaluate trust.
/// - Parameter domain: The domain from where we expect our trust object to come from.
public func validate(serverTrust: SecTrust, domain: String?) -> Bool {
return false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment