Skip to content
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

How to Check if PKCS11 module is valid or not #3091

Open
aniljadaun opened this issue Mar 27, 2024 · 1 comment
Open

How to Check if PKCS11 module is valid or not #3091

aniljadaun opened this issue Mar 27, 2024 · 1 comment

Comments

@aniljadaun
Copy link

I am new to this. Sorry is advance if my question is too naive.

PKCS11 Module is not correctly loaded into my App. Another module is correctly loaded. I need to check if issue is with module or App.

Using the below command for testing the validity of both modules:

pkcs11-tool --module "module.dll" --list-slot

output for working module:


Available slots:
Slot 0 (0x0): Virtual Slot 0
(empty)
Slot 1 (0x1): Virtual Slot 1
(empty)
Slot 2 (0x2): Virtual Slot 2
(empty)
Slot 3 (0x3): Virtual Slot 3

Output for non-working module

0x00007b78 : 0x00008350 : ****************************** 2024-03-27 20:13:08 ***
0x00007b78 : 0x00008350 : PKCS11-LOGGER 2.2.0
0x00007b78 : 0x00008350 : PKCS#11 logging proxy module
0x00007b78 : 0x00008350 : Developed as a part of the Pkcs11Interop project
0x00007b78 : 0x00008350 : Please visit www.pkcs11interop.net for more information
0x00007b78 : 0x00008350 : ****************************** 2024-03-27 20:13:08 ***
0x00007b78 : 0x00008350 : ****************************** 2024-03-27 20:13:08 ***
0x00007b78 : 0x00008350 : Calling C_GetFunctionList
0x00007b78 : 0x00008350 : Input
0x00007b78 : 0x00008350 : ppFunctionList: 00007FFF3B722048
0x00007b78 : 0x00008350 : Output
0x00007b78 : 0x00008350 : Note: Returning function list of PKCS11-LOGGER
0x00007b78 : 0x00008350 : Returning 0 (CKR_OK)
0x00007b78 : 0x00008350 : Successfuly loaded D:\PKCS11_DLLS (1)\pkcs11-logger-x64.dll
0x00007b78 : 0x00008350 : Memory contents are dumped without endianness conversion
0x00007b78 : 0x00008350 : ****************************** 2024-03-27 20:13:08 ***
0x00007b78 : 0x00008350 : Calling C_GetFunctionList
0x00007b78 : 0x00008350 : Input
0x00007b78 : 0x00008350 : ppFunctionList: 00000090E273F9D8
0x00007b78 : 0x00008350 : Output
0x00007b78 : 0x00008350 : Note: Returning function list of PKCS11-LOGGER
0x00007b78 : 0x00008350 : Returning 0 (CKR_OK)
0x00007b78 : 0x00008350 : ****************************** 2024-03-27 20:13:08 ***
0x00007b78 : 0x00008350 : Calling C_Initialize
0x00007b78 : 0x00008350 : Input
0x00007b78 : 0x00008350 : pInitArgs: 0000000000000000
0x00007b78 : 0x00008350 : ****************************** 2024-03-27 20:13:08 ***
0x00007b78 : 0x00008350 : Calling C_Initialize
0x00007b78 : 0x00008350 : Input
0x00007b78 : 0x00008350 : pInitArgs: 0000000000000000
0x00007b78 : 0x00008350 : ****************************** 2024-03-27 20:13:08 ***
0x00007b78 : 0x00008350 : Calling C_Initialize
0x00007b78 : 0x00008350 : Input
0x00007b78 : 0x00008350 : pInitArgs: 0000000000000000
0x00007b78 : 0x00008350 : ****************************** 2024-03-27 20:13:08 ***
0x00007b78 : 0x00008350 : Calling C_Initialize
0x00007b78 : 0x00008350 : Input
0x00007b78 : 0x00008350 : pInitArgs: 0000000000000000
0x00007b78 : 0x00008350 : ****************************** 2024-03-27 20:13:08 ***
0x00007b78 : 0x00008350 : Calling C_Initialize
0x00007b78 : 0x00008350 : Input
0x00007b78 : 0x00008350 : pInitArgs: 0000000000000000
0x00007b78 : 0x00008350 : ****************************** 2024-03-27 20:13:08 ***

@frankmorgner
Copy link
Member

your test worked great, the non working module is shown as not working!

your non-working module is only used for logging, it doesn't implement any pkcs11 functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants