Try to access Oberthur Cosmo64 - HSM in .Net Framework 4

3/20/2011 1:35:13 PM
Gravatar
Total Posts 1

Try to access Oberthur Cosmo64 - HSM in .Net Framework 4

Hello,

 

     As stated in the subject, I'm trying to access an Oberthur Cosmo64 -  HSM with NCryptoki. I'm using the sample project TestNCryptoki with the HSM vendor's PKCS#11 library (OCSCryptoki.dll). The project runs successfully to the line (Token token=slot.Token) - I've loaded slots[3] after observing that there I have "On Chip Security 3 USB Reader 0".  The next line TokenInfo tinfo=token.info rises an exception with error code n.225 and error string "TOKEN_NOT_RECOGNIZED". What could be the problem ?

 

Sincerely,

Alex

4/7/2011 11:35:21 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Try to access Oberthur Cosmo64 - HSM in .Net Framework 4

This kind of error usually appears when you use an HSM or a token with a wrong PKCS#11 dll. i.e. you attached NCryptoki to a PKCS#11 dll that is not compliant with the HSM/Token in the selected slot. This is why you got TOKEN_NOT_RECOGNIZED.

Consider that NCryptoki always forward the errors coming from the underlying PKCS#11. This means that TOKEN_NOT_RECOGNIZED comes from OCSCryptoki.dll.