How to interface with PKCS #11 compliant HSM device in .Net? [closed]

人盡茶涼 提交于 2020-01-16 16:34:31

问题


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!


回答1:


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).




回答2:


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,



来源:https://stackoverflow.com/questions/812894/how-to-interface-with-pkcs-11-compliant-hsm-device-in-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!