Replace the certificate that uses a broken hash
Why it matters
A certificate in the chain is signed with SHA-1 or MD5, hashes that can be forged, so browsers refuse it. It comes from a very old certificate or an old intermediate file.
The fix
- Find which certificate in the chain uses the weak hash with the command below. It lists each certificate's signature algorithm.
- If it is your own certificate, re-issue it from your CA, which now signs with SHA-256 or stronger.
- If it is an intermediate, replace the bundle file with the CA's current chain, or re-issue and use the new fullchain file.
- Reload the web server and run the command again to confirm.
bash
openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null 2>/dev/null | awk '/BEGIN CERT/{n++; f="cert" n ".pem"} f{print > f} /END CERT/{f=""}' for f in cert*.pem; do openssl x509 -in "$f" -noout -subject -text | grep -E "Subject:|Signature Algorithm" | head -2; done
The examples use example.com. Replace it with your own domain.
Related
- Reported by the certificate chain and expiry check
- Renew the expired TLS certificate
- Fix a certificate that is not valid yet
- Renew the certificate before it expires
- Install a certificate that covers this hostname
- Replace the self-signed certificate with a trusted one
- Use a certificate from a publicly trusted authority
- Serve the full certificate chain
- Replace the expired intermediate certificate
- Re-issue the certificate with a stronger key
- Fix the certificate that browsers reject
Scan your domain to see whether this applies to you.