To pin or not to pin: SSL pinning for Android & iOS
summary
Recommends pinning only when certificate lifecycle and private‑key management are mature, and prefers public key pinning over certificate pinning; shows working Android recipe using network_security_config on Android N and an OkHttp3 pinning example, notes API level 17 fixes for chain cleaning, and warns about needing backup keys stored securely. For iOS shows bundle cert pinning with Alamofire or TrustKit, demonstrates verification with Burp proxy, and reports that the approaches work but break apps if rotation or key compromise aren’t planned.
AI-written summary · about
chapters (15)
- 0:00Introduction to SSL pinning
- 1:08Why pin SSL certificates
- 3:37Organizational maturity for pinning
- 5:24What to pin: certificate vs key
- 7:11Leaf vs root certificate pinning
- 8:58Public key pinning basics
- 10:01SSL pinning on Android
- 12:53Android pinning alternatives
- 13:36SSL pinning on iOS
- 15:21iOS pinning with libraries
- 16:04Basic verification with Burp
- 17:09Key takeaways and recommendations
- 18:13Future iOS changes impact
- 19:16Q&A: Compromised keys handling
- 20:51Q&A: User trust decisions
