Is there any way to obtain pkcs#11 library path from windows csp

1k Views Asked by At

Earlier i was using certenroll to list csp and generate CSR and now i want use pkcs11Interop to do the same, but to initialize the pkcs11Interop we must provide the path of pkcs#11 library is there any way to get that path for available csp or pkcs#11 library.

1

There are 1 best solutions below

2
On BEST ANSWER

CSPs (Cryptographic Service Providers) are plugins for Microsoft Crypto API and they are first class citizens in Windows OS. They are centrally managed, one can acquire their list via native Windows APIs, you can access them via single CryptoAPI etc. It is sad but AFAIK no similar infrastructure exists in Windows OS for PKCS#11 modules.

If you are working with single card/token or small amount of different cards/tokens you can "hardcode" library paths/names and present predefined list to the user.