Reading Smart Card Certificate Using Javascript

I need to know if smart card certificate can be read using Javascript. NodeJS will be fine. I researched and found the NodeJS plugin

xml-crypto 

for digitally signing xml, it works fine, but I wrote the correct path to the .pem certificate on my drive (this was not on the smart card). How does it work with smart cards , then?

+6
source share
2 answers

There is a node.js binding for pcsc-lite (in case your code runs on Linux)

https://github.com/LudovicRousseau/node-pcsclite

0
source

Smart cards come with a CSP, which makes certificates in the smart card available in the certificate store when the smart card is installed. Once the certificate is available in the certificate store, we can use the browser’s built-in messaging system. The host application running the browser (browser extension) reads the certificate from the certificate store, which, in turn, can be accessed through JavaScript in the browser. My company offers one such free extension: Signer.Digital

Here I answered various questions about SO depending on the requirement to sign authentication tokens , content, or PDF files and documents .

0
source

Source: https://habr.com/ru/post/986549/


All Articles