If we’re talking fetching SSL/TLS certificates in general, one could simply “openssl s_client -connect host:port” No point in installing an npm package just for that.
To save just the certificate into a file: openssl s_client -connect host:port | openssl x509 [-text] > myfile.pem
Of course, if this is targeted at Node.js developers, then I’d have altered the title to reflect that, “Retrieve the public TLS certificate in x509 format from a distant host in Node.js”
If we’re talking fetching SSL/TLS certificates in general, one could simply “
openssl s_client -connect host:port” No point in installing an npm package just for that.To save just the certificate into a file:
openssl s_client -connect host:port | openssl x509 [-text] > myfile.pemOf course, if this is targeted at Node.js developers, then I’d have altered the title to reflect that, “Retrieve the public TLS certificate in x509 format from a distant host in Node.js”