What is certificate pinning and why is it risky?
AdvancedConceptHTTP, TLS & Certificates
Answer
The client hard-codes an expected certificate or public key hash so even a trusted CA cannot impersonate the server. It protects against rogue CAs but breaks when you rotate certs or switch CA unless you pin a backup key.
Browsers removed HPKP; mobile apps still use it with fallback pins. In server-to-server code prefer private CA trust over per-cert pinning.
More on HTTP, TLS & Certificates
What is the structure of an HTTP request and response?BeginnerWhich HTTP status code classes and codes should every DevOps engineer know?BeginnerWhat are the common HTTP methods and which are idempotent?BeginnerWhat changed between HTTP/1.1, HTTP/2 and HTTP/3?IntermediateHow does QUIC differ from TCP+TLS?AdvancedWhat are HTTP keep-alive and connection reuse, and why do they matter?Advanced