cryptoauthlib
cryptoauthlib copied to clipboard
ATECC608B - Unable to load module /usr/lib/libcryptoauth.so - PKCS#11 module:ERR_CKR_error:Cannott lock
Hello, i'm working on a SAMA5D27 and an ATECC608B_SSHB Secure Element on a Yocto distro (Kirkstone branch). The ATECC608B seems works correctly
The device is connected on the 4th I2C bus at the address 0x60, so
But, following
https://github.com/MicrochipTech/cryptoauthlib/wiki/PKCS11-Linux-Setup
when I
or
openssl req -new -engine pkcs11 -keyform engine -key label_mykey -subj "/CN=My CSR" -x509 -out mykey_selfsigned_cert.pem
with
root@obugo:/# cat /etc/openssl_atecc608b.conf
openssl_conf = openssl_conf
[openssl_conf]
engines = engine_section
[engine_section]
pkcs11 = pkcs11_section
[pkcs11_section]
engine_id = pkcs11
dynamic_path = /usr/lib/engines-3/libpkcs11.so
MODULE_PATH = /usr/lib/libcryptoauth.so
init = 0
I got:
Engine "pkcs11" set.
Unable to load module /usr/lib/libcryptoauth.so
Unable to load module /usr/lib/libcryptoauth.so
PKCS11_get_private_key returned NULL
Could not read private key from org.openssl.engine:pkcs11:label_mykey
40AFF5B6:error:4180000A:PKCS#11 module:ERR_CKR_error:Cannott lock:../../git/src/p11_load.c:92:
40AFF5B6:error:13000080:engine routines:ENGINE_load_private_key:failed loading private key:../openssl-3.0.8/crypto/engine/eng_pkey.c:79:
Any suggestions?