Daily iOS
Security

Certificate pinning

How would you implement certificate pinning (SSL pinning) on iOS?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

In the URLSessionDelegate authentication challenge you run the default SecTrust evaluation, compare the public key hashes from the server's certificate chain against pins built into the app, and continue with .useCredential only on a match.

Share a question