Certificate pinning is a client-side check that permits a TLS connection only when the server presents a specifically expected certificate or public key. It reduces reliance on the web public key infrastructure. section 9.3 section 9.6
The threat is a misbehaving certificate authority: an attacker who controls a domain-matching certificate and reaches a man-in-the-middle position could impersonate the service. Pinning gives a client-controlled connection an additional identity check. section 9.3
A deployment can choose between two trust boundaries:
- Rely on a specifically pinned certificate or public key. section 9.3 section 9.6
- Avoid the web PKI altogether by relying on an organization’s own PKI. section 9.3
A certificate authority goes rogue
Suppose a CA signs a certificate for your domain using a public key it controls. If an attacker can intercept traffic, ordinary web-PKI validation may accept the impersonator; pinning can reject the unexpected certificate or key. section 9.3
