Package io.ktor.client.engine.ios.certificates

Types

Link copied to clipboard
data class CertificatePinner : Function4<<ERROR CLASS>, <ERROR CLASS>, <ERROR CLASS>, completionHandler: (<ERROR CLASS>, <ERROR CLASS>?) -> Unit, Unit>

Constrains which certificates are trusted. Pinning certificates defends against attacks on certificate authorities. It also prevents connections through man-in-the-middle certificate authorities either known or unknown to the application's user. This class currently pins a certificate's Subject Public Key Info as described on Adam Langley's Weblog. Pins are either base64 SHA-256 hashes as in HTTP Public Key Pinning (HPKP) or SHA-1 base64 hashes as in Chromium's static certificates.

Link copied to clipboard
data class PinnedCertificate(pattern: String, hashAlgorithm: String, hash: String)

Represents a pinned certificate. Recommended to use Builder.add to construct CertificatePinner