Menu

1 / 2

Every request failed the morning the certificate renewed. Certificate pinning on mobile, and how to stop it bricking your app.

DEV Community: mobile·MinPin Proxy·8 days ago
#S2VY7Sa6
#devtomobile#devto#dev#certificate#pinning
Long article (872 words) — no AI summary yet.
Reading 0:00
15s threshold

The incident: nothing was deployed, but overnight every request from the mobile app started failing. The website works. The API works from curl. Only the app is broken, for every user, and the backend team sees no errors because the requests never arrive.

Then someone remembers the app pins the server's certificate, and the certificate renewed last night.

Pinning means the app accepts only specific keys for your server, on top of normal certificate validation. It protects against a mis-issued or locally installed certificate. It also means any change to those keys on the server breaks every installed copy of the app until users update. Here's how to pin without that risk, or decide not to pin.

What's actually pinned

There are three common choices, and they fail differently:

The leaf certificate (the whole cert): breaks at every renewal. Avoid.

The leaf's public key (SPKI hash) : survives renewal only if the new certificate reuses the same key.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.