Reputation: 29
I want to list all active slots in softhsm2 by using --list-slots
. But pkcs11-tool
provide different results when I use with and without sudo
:
sudo pkcs11-tool --module /usr/local/lib/softhsm/libsofthsm2.so --list-slots
Available slots:
Slot 0 (0x3820801b): SoftHSM slot ID 0x3820801b
token label : Test Token
token manufacturer : SoftHSM project
token model : SoftHSM v2
token flags : login required, rng, SO PIN count low, token initialized, PIN initialized, other flags=0x20
hardware version : 2.6
firmware version : 2.6
serial num : 9fdf8adcb820801b
pin min/max : 4/255
Slot 1 (0x4224455f): SoftHSM slot ID 0x4224455f
token label : hellotoken
token manufacturer : SoftHSM project
token model : SoftHSM v2
token flags : login required, rng, token initialized, PIN initialized, other flags=0x20
hardware version : 2.6
firmware version : 2.6
serial num : 09890b8c4224455f
pin min/max : 4/255
Slot 2 (0x46f8c6dc): SoftHSM slot ID 0x46f8c6dc
token label : mytoken1
token manufacturer : SoftHSM project
token model : SoftHSM v2
token flags : login required, rng, SO PIN count low, token initialized, PIN initialized, other flags=0x20
hardware version : 2.6
firmware version : 2.6
serial num : ecabb343c6f8c6dc
pin min/max : 4/255
Slot 3 (0x74a6136e): SoftHSM slot ID 0x74a6136e
token label : token-label
token manufacturer : SoftHSM project
token model : SoftHSM v2
token flags : login required, rng, token initialized, PIN initialized, other flags=0x20
hardware version : 2.6
firmware version : 2.6
serial num : 51a8110974a6136e
pin min/max : 4/255
Slot 4 (0x4): SoftHSM slot ID 0x4
token state: uninitialized
and without sudo
pkcs11-tool --module /usr/local/lib/softhsm/libsofthsm2.so --list-slots
Available slots:
Slot 0 (0x3820801b): SoftHSM slot ID 0x3820801b
token label : Test Token
token manufacturer : SoftHSM project
token model : SoftHSM v2
token flags : login required, rng, SO PIN count low, token initialized, PIN initialized, other flags=0x20
hardware version : 2.6
firmware version : 2.6
serial num : 9fdf8adcb820801b
pin min/max : 4/255
Slot 1 (0x1): SoftHSM slot ID 0x1
token state: uninitialized
How to solve this?
Upvotes: 0
Views: 110