node-webcrypto-p11 icon indicating copy to clipboard operation
node-webcrypto-p11 copied to clipboard

How to use USB token reader on windows

Open sdellava opened this issue 3 years ago • 1 comments

Hi, I'm trying to use this library in a Windows environment using USB smart card reader produced by Advanced Card Systems Ltd, CCID USB smart card reader.

From device manager I can see this information:

Location: Port_#0002.Hub_#0002

How I've to set the config ?

const config = { library: "............", name: "CCID USB smart card reader", slot: 0, readWrite: true, pin: "12345" };

sdellava avatar May 01 '21 09:05 sdellava

That looks roughly right but a lot depends on the card middleware, since you have not given us any environmental details or errors I am not sure how to help you.

I recommend getting something working as a baseline, for example SoftHSM, and then trying your specific parameters...

Const { Crypto } = require("node-webcrypto-p11");
const config = {
    library: "/usr/local/lib/softhsm/libsofthsm2.so",
    name: "SoftHSM v2.0",
    slot: 0,
    readWrite: true,
    pin: "12345"
};

rmhrisk avatar May 01 '21 18:05 rmhrisk