Skip to content

Instantly share code, notes, and snippets.

@deangrant
Last active January 8, 2023 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deangrant/4fb6efc433790c38050acf1c4595482a to your computer and use it in GitHub Desktop.
Save deangrant/4fb6efc433790c38050acf1c4595482a to your computer and use it in GitHub Desktop.
Check the Lets Encrypt certificate against the trusted CAs and any untrusted certificates specified to verify its authenticity
# Set the DOMAIN variable to the desired domain name
DOMAIN={{ domain }}
# Use the openssl utility to verify the SSL/TLS certificate
# located at /etc/letsencrypt/live/${DOMAIN}/cert.pem
# The -CAfile flag specifies a file containing trusted CA certificates
# The -untrusted flag specifies a file containing additional, untrusted certificates
# that will also be used in the verification process
openssl verify \
-CAfile /etc/ssl/certs/ca-certificates.crt \
-untrusted /etc/letsencrypt/live/${DOMAIN}/chain.pem \
/etc/letsencrypt/live/${DOMAIN}/cert.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment