How to detect if a PKCS11 token presents in a system?

Michael StJohns mstjohns at comcast.net
Sun Jun 17 04:18:20 UTC 2012


C_GetSlotInfo will tell you whether or not there is a token in the slot.  

Sent from my iPad

On Jun 15, 2012, at 7:49, Andrey Atapin <a.atapin at gmail.com> wrote:

> Hello,
> Right now I'm solving this problem by calling 'getMechanismsList' on
> the PKCS11 wrapper object. Considering that Windows x86-64 doesn't
> have PKCS11 support in Java, code becomes more tricky, because I have
> to instantiate all objects via reflection. Is it possible to avoid
> using such tricks and detect a token presence/removal in a more
> straightforward way?
> 
> Sincerely,
> Andrey Atapin.



More information about the security-dev mailing list