-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: Failed to load pkcs11 module #2884
Comments
Building on windows or cross compiling are very tricky.
Windows does not support setting environment variables on the command line. Use the "set" command. It looks like you are mixing a windows built pkcs11-tool with a cross compiled module. That may never work. As I said in #2883 "submit your changes as a Pull Request, Windows MSI and MacOS DMG files are created automatically on github and your changes will be kept up to date." Based on #2883 it looks like you are trying to make changes to So I would suggest that the best way to get support for this device using OpenSC code get it working on Linux, then submit your changes as a PR, let Github build the Windows MSI and MacOS DMG files and use them to test. When you get it working, your company can say the new device is supported by OpenSC like other smartcard venders do. If you goal is to copy OpenSC code and distribute your own version based on OpenSC, you may have license issues. |
Hello @dengert Thank you for your response. By "we" I mean the team working on the code. Yes, we are using OpenSC card-entersafe and have made some modifications to the code to suite the working of our token which supports USB A, USB C and NFC. There is no button as such but a simple touch pad to showcase user presence. We are able to get the code working perfectly on Linux. But we need the Windows .dll and the .dylib for macOS which we did not get. Hence we are trying to compile on Windows once again. We are able to compile it within cygwin and Windows but the created .dll doesn't work. We need to provide the .dll file to someone who can then test our device. Not sure how to proceed there. Hence we are trying to compile it on Windows. Hope this explains what we are trying to accomplish. |
Do you have a member who has uses github before? make your changes to your local copy I am busy most of rest of day... |
Thank you @dengert for your suggestion. We will get back on this shortly |
Hello,
We tried to create the new OpenSC dll on Windows all fine.
Then we tried to run it on Windows and we got the error as below
C:\Program Files\OpenSC Project\OpenSC\tools>pkcs11-tool --module "C:\xxxxx\xxxxxx\Downloads\opensc-pkcs11.dll" -L sc_dlopen failed: LoadLibrary/GetProcAddress failed error: Failed to load pkcs11 module Aborting.
Furthermore, when we built the OpenSC from within Cygwin and tried to run it from within Cygwin we got the proper response for the -L command
Also, we are not able to run the OPENSC_DEBUG=9 prompt to get the logs unfortunately
C:\Program Files\OpenSC Project\OpenSC\tools>OPENSC_DEBUG=9 pkcs11-tool --module "C:\xxxxx\xxxxx\Downloads\opensc-pkcs11.dll" -L 'OPENSC_DEBUG' is not recognized as an internal or external command, operable program or batch file.
Can you please advise what we are missing?
The text was updated successfully, but these errors were encountered: