smaoski.dll

11/8/2010 4:01:27 PM
Gravatar
Total Posts 1

smaoski.dll

I am using the trial version for evaluations purposes with a Feitian ePass2000 token supplied by a local vendor (Pronova) and I found some errors while executing the example in C#.

I'm using Microsoft Visual Studio 2010 Ultimate and Windows 7 Enterprise (x64) and solution was converted successfully.

I'm using the 64 bits dlls form the examples as well.

When I try to execute the example, it throws a System.NullRefrenceException in

Cryptware.NCryptoki.Cryptoki.Attach(String cryptokilib)
in Cryptware.NCryptoki.Cryptoki..ctor(String cryptokilib)
in USCToolkit.NCryptokiTest.Program.Main(String[] args) in C:\Downloads\NCryp
toki+v1.4.3.2\examples\C#\TestNCryptoki\Program.cs:line14

As you can see, this line is the constructor call and I think that the smaoski.dll is missing.

Where can I find this DLL?

 

11/8/2010 4:43:06 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: smaoski.dll

Hi,

smaoscki.dll is the dll that implements the PKCS#11 module of the smart card Cryptware SmartOS CK.

To attach NCryptoki to a native PKCS#11 dll you have first to locate the PKCS#11 dll of your token. To attach it to your dll you have to change "smaoscki.dll" with the path to PKCS#11 dll of your token:

For more information about this topic see this page on NCryptoki wiki:

http://wiki.ncryptoki.com/Attach-NCryptoki-to-native-PKCS-11-dll.ashx

 

Regards,

Ugo Chirico
http://www.ugochirico.com

2/2/2011 9:15:56 PM
Gravatar
Total Posts 2

Re: smaoski.dll

Sorry, it is kinda stupid to ask this question but where can I download PKCS#11.dll file ?  I google it and all I get is documentation.  I even went to RSA website but I didn't see the download.

 

Thank You

2/3/2011 1:08:25 AM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: smaoski.dll

The PKCS#11 module is supplied by the smart card vendor. Each smart card vendor that sells PKCS#11 compliant smart cards should supply also the dll that implements the PKCS#11 specification.

 

Regards,

Ugo Chirico
http://www.ugochirico.com

2/3/2011 3:16:30 PM
Gravatar
Total Posts 2

Re: smaoski.dll

Hello,

 

I am using Thales HSM 8000 and I couldn't find any pkcs#11 dll on the CD that was deliver with the HSM.  Maybe I should contact the vendor and ask them to email me the dll  you think ?  Beside that, is there another way I can get PKCS#11 dll from some other places ?

Thank You,

Dan

2/22/2011 6:27:19 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: smaoski.dll

Each HSM/Smart Card/Token has its own specific PKCS#11 dll. This means that your HSM/Smart Card/Token vendor must supply you the dll that implements the PKCS#11 specifications.

Usually such dll is installed by the setup related to the HSM or Smart Card/Token. There is no other way to get a PKCS#11 for your token.

If you want to test the behaviour of a PKCS#11 you can install a virtual PKCS#11 module that emulate a token/HSM. If you need that I can give you the current beta version of my virtual HSM

4/11/2011 12:32:11 PM
Gravatar
Total Posts 8

Re: smaoski.dll

I want to emulate with a virtual HSM to understand the mecanism. Where can i find it?

4/11/2011 12:41:43 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: smaoski.dll

Hi,

you can download my Virtual HSM from the download page.

The virtual HSM supplies a graphical interface to manage the HSM (to load a key, to load a certificate and so on).

it is implemented in the dll vcki.dll (virtual cryptoki). You can use such dll with NCryptoki specifying it in the Cryptoki constructor.

 

Regards,

Ugo Chirico

 

4/12/2011 11:08:10 AM
Gravatar
Total Posts 1

error 19 in generatekeypair command

There is one error in Ncryptoki application

 

We need create generate keypair it shows the error-19-invalid attriubute value

 

Please help me

 

Thanks

4/12/2011 10:35:38 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: smaoski.dll

Error 19 - CKR_INVALID_ATTRIBUTE_VALUE appears when you use a wrong combination of attributes in the template in some cryptoki functions like GenerateKeyPair.

Can you post the template you are using?

What HSM/Token are you using?

4/14/2011 11:54:14 AM
Gravatar
Total Posts 8

Re: smaoski.dll

Bonjour,

I use SafeNet ProtectServer Orange, I instal SDK(mode software only) to emulate . how can i create an C# application that use its cryptoki.dll .

regards

4/14/2011 2:19:34 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: smaoski.dll

First of all read the quick guide you can find in the download page.

Than install NCryptoki SDK, that you can download from the same page. In the SDK you will find a sample project that help you to start writing application in C# with NCryptoki.

Finally, refer the the wiki for more info, code snippets and so on.

4/20/2011 6:11:08 PM
Gravatar
Total Posts 8

Re: smaoski.dll

dear Ugo,

 

i tried to generate a certificate fram onather , but i have yhis error message

Error 1 'Cryptware.NCryptoki.X509Certificate' does not have a constructor that accepts arguments '1 'D: \ Documents and Settings \ missbah \ My Documents \ Visual Studio 2008 \ Projects \ HSMtest \ HSM \ Program.cs 256 40 HSM

 

regards

4/27/2011 7:40:17 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: smaoski.dll

You cannot generate a certificate from another. Certificate objects are attached to the related token objects.

You cannot create new certificate objects without creating a new certificate object in the token.

What are you trying to do?

8/12/2012 9:22:52 AM
Gravatar
Total Posts 1

Re: smaoski.dll

I am using Ncrypto to coding digital sign for my text. and my token in epass3003. I initialized crypto like this: 

  Cryptoki cryptoki = new Cryptoki("smaoscki.dll");

          int nret = cryptoki.Initialize();

            if (nret != 0)
            {
                error(nret);
            }

but when i run my code an exception occur that says: "An unhandled exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll

Additional information: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information."

I also replaced "smaoscki.dll" with my token pkc#11 dll but still this exeption occurs.

How should i do?

Thanks

8/13/2012 12:46:44 AM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: smaoski.dll

You are using NCryptoki in a .NET 4 application.

Read this: http://ncryptoki.com/Forums/Thread.aspx?pageid=9&mid=22&ItemID=1&thread=3

7/1/2014 3:42:22 PM
Gravatar
Total Posts 1

Re: smaoski.dll

Hello,

I'm using the gclib.dll (Gemalto). I have an error

"The selected PKCS#11 module seems to be invalid. Error code: -2147467259"

?????

Thank you for your answer.

7/1/2014 3:46:05 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: smaoski.dll

this error appears when one of the following happen:

 

1) You are running the application on a 64bit OS and are trying to load a 32bit PKCS#11 dll

2) The PKCS#11 dll is not found or you don't have the permission to access such a dll