import os
import pkcs11
lib = pkcs11.lib(os.environ['PKCS11_MODULE'])
token = lib.get_token(token_label='My SoftHSMv2 token')
with token.open(rw=True,user_pin='2023') as session:
print(session)
Traceback (most recent call last):
File "pkcs11/_errors.pyx", line 88, in pkcs11._pkcs11.assertRV
RuntimeError: Initialisation error (not initialized). Should never see this.
Exception ignored in: 'pkcs11._pkcs11.lib.__dealloc__'
Traceback (most recent call last):
File "pkcs11/_errors.pyx", line 88, in pkcs11._pkcs11.assertRV
RuntimeError: Initialisation error (not initialized). Should never see this.
Traceback (most recent call last):
File "/home/jk/pqapp-build/test_pkcs11.py", line 4, in <module>
lib = pkcs11.lib(os.environ['PKCS11_MODULE'])
File "/home/jk/.local/lib/python3.10/site-packages/pkcs11/__init__.py", line 32, in lib
_lib = _pkcs11.lib(so)
File "pkcs11/_pkcs11.pyx", line 1432, in pkcs11._pkcs11.lib.__cinit__
File "pkcs11/_errors.pyx", line 88, in pkcs11._pkcs11.assertRV
pkcs11.exceptions.GeneralError
Hello I'm trying to write a test for softhsmV2 but i'm not able to load libsofhsm2.so
What i did wrong ?