问题原文
原帖链接 · Bob Ortiz · CC BY-SA 3.0
Can I setup Public-Key-Pins when I setup a cronjob to renew the LetsEncrypt certificate every 30 days?
If the certificate is renewed then the Public-Key-Pin is also renewed right?
社区高分解答
原帖链接 · Barry Pollard · CC BY-SA 3.0
Would echo everything that gf_ said.
However, to answer the question, yes you can.
By default Let's Encrypt recreates the key and the cert at renewal. This makes implementing HPKP difficult if you want to pin at the leaf, which you probably should do in case intermediate changes (like it did in March 2016).
So you've several options around this if you still want to do HPKP:
- Use your own fixed CSR rather than the standard client which creates the CSR for you each time so the leaf key doesn't change. This blog post explains how to do this specifically because the author uses HPKP.
- Use short HPKP expiries and renew within that expiry time and change policy to have both old and new keys before actually changing the cert, with enough time for new policy to be picked up by any visitors.
- Pin the Let's Encrypt root instead of the leaf or cert.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
