I am using node-forge distribution from below link
https://github.com/digitalbazaar/forge-dist/blob/master/dist/forge.min.js
How to get Certificate thumbprint in my application using node-forge as cross platform application. My application is connection to some domain like www.anydomain.com every time it makes ajax call to get the data from the services. I want to read certificate thumbprint to apply some logic.
enter image description here
Please help if anybody have the solution.
It's not really straightforward, but (if your certificate is cert
variable):
const md = forge.md.sha1.create();
md.update(forge.asn1.toDer(forge.pki.certificateToAsn1(cert)).getBytes());
const hex = md.digest().toHex();
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