Open E-genin opened 2 years ago
You can't give a relative path to a DLL. You have to supply the full path name. Please read the output of the error as it tells you the problem.
FileNotFoundError: Could not find module 'libhsm.dll' (or one of its dependencies). Try using the full path with constructor syntax.
@bentonstark thanks for the reply,
My understanding is that there should be two *.dll files, one is the libhsm.dll
that was generated and the other one provided by UTIMACO cs_pkcs11_R2.dll
The lib I provided a relative path to is the cs_pkcs11_R2.dll
but the script error refers to the libhsm.dll
to which I provided the absolute path in the PATH system variable.
There are at least two DLLs. The way it works is the libhsm.dll contains the PKCS-11 API interfaces and will invoke the cs_pkcs11_R2.dll which implements those interfaces. The cs_pkcs11_R2.dll also implements the proprietary vendor calls to the actual HSM device. If any dependencies are missing for the cs_pkcs11_R2.dll, the libhsm.dll cannot find the cs_pkcs11_R2.dll, or Windows cannot find the libhsm.dll on a LoadLibrary API call you will get an error.
I am not sure I am missing any dependencies, I worked with cs_pkcs11_R2.dll
in another application and it works fine.
Maybe something went wrong during the generation of the libhsm.dll
Could you please check with the attached dll or attach your dll just to confirm it is not related to the generation.
libhsm.zip
hi @bentonstark , did you have a chance to test the dll I attached.
I don't know how to politely put this but I have a full time job and other priorities that exceed free debug testing.
I fully understand @bentonstark , I didn't mean to offend you in any way. I will keep digging on the issue and share the solution here if I find something.
Hi,
I recompiled the libhsm and generated libhsm.dll in Windows (using codeblocks IDE), I added the dll's path to the PATH system variable.
When I try to run the sample code in the readme file :
I get the following error saying it could not find the libhsm.dll file :
Can you please tell me what am I missing ?