Closed bjarnemagnussen closed 5 years ago
Oh nevermind! I just found out that for some reason the user_id
for the Crypto User is 0x80000001
(https://github.com/chevah/safenet-p11sample/blob/80441f34deada8d6785369d68b71ec0deca81ca9/include/cryptoki_v2.h#L117), or as integer: 2147483649.
Hence using
login_ex(
auth_session, 3, "crypto_user_pin", user_type=2147483649
)
allows to login as the Crypto User.
When opening a session using
login_ex()
I can provide auser_type
.But it seems
pycryptoki
only supports the Partition SO (user_type
set to0
), or Crypto Officer (user_type
set to1
). Is there for security reasons any way I can login with the Crypto User, which has only limited rights?