Object Reference Error During Cryptoki Instance Creation

10/27/2014 2:23:25 PM
Gravatar
Total Posts 3

Object Reference Error During Cryptoki Instance Creation

Hi there,

I'm a newbie at HSM and token topics. This can be very easy question but i'm stuck at this for few days.

I'm using NCryptoki.dll for our project. But at the first step during the creation of Cryptoki instance i got an error of "Object Reference Not Set an Instance of an Object". The line that i got the error is below;
 

Cryptoki cryptokiInstance = new Cryptoki(dllPath);
 

I've installed LunaSA (64 bit). My .NET web application is 64 bit. Also i'm using .net framework 4.5.


I'm using "C:\Program Files\LunaSA\cryptoki.dll" as my dll path. But i saw another dll in "C:\Program Files\Cryptware NCryptoki SDK\lib\NCryptoki.dll". 

 

Which one i should use to create an instance of Cryptoki class? Or am i missing something else?


Best Regards,
Onur Yavuz

11/11/2014 10:26:25 AM
Gravatar
Total Posts 8

Re: Object Reference Error During Cryptoki Instance Creation

Hi onur yavuz,

You have to use the cryptoki.dll provided by your HSM device. This dll is the  one and only core thing to communicate Ncryptoki Framework  with your HSM device.

in your case you should use C:\Program Files\LunaSA\cryptoki.dll

Many Thanks,