SSL Certificate Pinning
Mobile apps.
Overview
SSL certificate pinning binds a mobile app to specific server certificates or public keys. Pinning prevents man-in-the-middle attacks even when the device’s trust store is compromised. For high-value mobile applications (banking, healthcare, enterprise), the additional protection is worth the operational tax of managing pin rotation. The trade-off is real: pinning that goes wrong locks legitimate users out of the app.
- Mobile-app validation. App validates against pinned certs or keys. MITM catches at app level, not network level.
- Public-key pinning (SPKI hash). Pin the public key, not the full cert. Survives cert rotation when the same key is reused.
- Certificate pinning. Pin a specific cert. Strict binding; rotation requires app update.
- Backup pins plus trust-store bypass. Multiple pins support rotation; pinning bypasses the device trust store entirely so compromised CAs do not break security.
The approach
Three habits make SSL pinning produce real protection without locking legitimate users out: public-key pinning rather than cert pinning, multiple backup pins for rotation, and a server-side kill switch for emergency disable.
- Public-key pinning. SPKI hash rather than full cert. Survives cert rotation when key is reused.
- Backup pins. Pin current and next public key. Rotation works without forcing app updates first.
- Kill switch. Server-side flag that disables pinning client-side. Emergency exit if pinning lock-out occurs.
- Tested rotation plus documented pins. Validate pin updates before relying on them; per-app the pinned keys documented for the next rotation.
Why this compounds
Each pinned app adds protection that perimeter security cannot provide. The team’s mobile-security fluency deepens; rotation becomes routine; compliance frameworks that require pinning get satisfied with documented evidence.
- MITM risk drops. Pinning catches attacks that trust-store compromise would otherwise enable.
- Mobile-specific defence. Threat model matched at the right layer.
- Compliance. Financial-services and healthcare requirements often mandate pinning.
- Year-one investment, year-two habit. First pin is investment. By the third rotation, the process is routine.