CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

URLPubKeyExtractor 1.1.0

URLPubKeyExtractor 1.1.0

Maintained by Antoine Marandon.



  • By
  • Marandon Antoine

FoundationURLPubKeyExtractor

Easy way to extract a public key from a domain on iOS/macOS

Usage:

PubKeyExtractor.getPubKey(url: url, completion: {
    switch $0 {
    case .success(let key):
        print("pubKey: \(key.base64)")
    case .failure(let error):
        print("Could not get key because \(error)")
    }
})

Note:

The results will differ from the .pem because .pem include some headers.

Motivations:

Assess the impact of pubkey pinning techniques

Todo: macOS compat (should take a few minutes...)

Cocoapods:

pod 'URLPubKeyExtractor'