views:

1205

answers:

4

I am supposed to write a client application in C# that communicates with Thales WebSentry and I need a few hints at how to start.

Device comes with Java SDK but I need to do my programming in .NET. Are there any libraries in .NET that I can use, or will I have to do it all low-level (directly to socket). Any hints or pointers on how and where to start?

Thanks!

A: 

If the module is PKCS#11-compliant, there should be a .dll somewhere in the development kit that implements the PKCS#11 API. A Google search seems to indicate that it is called wspkcs11d.dll.

You should be able to P/Invoke to the PKCS#11 library. If Thales have not supplies documentation for the library, you can find the documentation here (but note that they most probably only support a subset of the full standard).

Rasmus Faber
Hi Rasmus, I have the feeling I'm missing something obvious, but to what PKCS#11 library are you refering to exactly? Care to clarify? Thanks!
Dan
See the edited answer.
Rasmus Faber
Funny old world, I work for Thales now :)
IanNorton
A: 

There is a CAPI provider for PKCS#11, it's called csp11 though it does not support private objects ( you cant login to tokens ).

The easiest way will be to p-invoke into the pkcs11 library from c#, Call C_GetFunctionList to get pointers to the other functions the library exposes. then call C_Initialize, you can use this with the other new PKCS#11 stuff from thales-ncipher too,

IanNorton
A: 

https://sourceforge.net/projects/pkcs11net/ could be helpful.

Ferhat
A: 

You can use NCryptoki, that is a .NET PKCS#11 wrapper to native PKCS#11 modules and allows to call PKCS#11 function in C# as well as vb.net. See this url for more information: http://www.ncryptoki.com

Ugo