I have the Let's encrypt certificate bundle. It includes the private key and certificate.crt
Using node.js and node-forge (not openssl), how can I get the expiry date of the certificate.crt?
check SSL certificate expiration date from a certificate file Openssl command is a very powerful command to check certificate info in Linux.We can use the flowing command to check the expiration date. openssl x509 -enddate -noout -in file.cer
Openssl command is a very powerful command to check certificate info in Linux.We can use the flowing command to check the expiration date. openssl x509 -enddate -noout -in file.cer
Linux users can easily check an SSL certificate from the Linux command-line, using the openssl utility, that can connect to a remote website over HTTPS, decode an SSL certificate and retrieve the all required data.
You can receive reminders by email or through Slack. The service is free for monitoring up to 2 domains and has a cost of $ 29 per year for up to 30 domains. Certificate Expiry Monitor is an open-source utility that exposes the expiry date of TLS certificates as Prometheus metrics for those who prefer to build their own tools.
You can use x509 module
var crt_pem = "<certificate in pem format which is content of your certificate.crt>";
const x509 = require('x509');
var crt_obj = x509.parseCert(crt_pem);
console.log(crt_obj.notBefore);
console.log(crt_obj.notAfter);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With