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

ATECC608B - Unable to load module /usr/lib/libcryptoauth.so - PKCS#11 module:ERR_CKR_error:Cannott lock #384

Open
SimoneBongini opened this issue Jul 5, 2024 · 0 comments

Comments

@SimoneBongini
Copy link

Hello,
i'm working on a SAMA5D27 and an ATECC608B_SSHB Secure Element on a Yocto distro (Kirkstone branch).
The ATECC608B seems works correctly

image

The device is connected on the 4th I2C bus at the address 0x60, so

image

But, following
https://github.com/MicrochipTech/cryptoauthlib/wiki/PKCS11-Linux-Setup
when I
image
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?

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

1 participant