-
Notifications
You must be signed in to change notification settings - Fork 221
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
Init with p11tool fails #95
Comments
I am not sure what the error is coming from so that does requires additional investigation. The device however is properly initialized at the end. All private keys must have a matching public key object per the PKCS#11 specification. The existence of the matched public key shows that the initialization succeeded. P11tool is accessing the public key to print out the public key of the stored private key in the last step. |
@bryan-hunt I also not able to Initialize the token for ATECC608A on my raspberry. |
In the
The issue was that after initializing the token in cryptoauthlib/lib/pkcs11/pkcs11_token.c Lines 245 to 248 in a0007d2
which is defined as cryptoauthlib/lib/atca_config.h Line 35 in a0007d2
later in cryptoauthlib/lib/pkcs11/pkcs11_slot.c Lines 200 to 218 in a0007d2
but somehow for be (when I check it with gdb) this does not happen. If I change
the initialization works fine. |
Any update on this? It's been a while and the problem seems to persist. I am using the p11-tool to initialize, resulting in the same error. However, the public key in slot 0 changes, to I assume something is happening in the ATECx08 (as Bryan has pointed out in a previous comment). |
I am trying the same with a Rpi4 board with the ATECC608A connected over I2C lines as well. I find myself in the same situation as reported here. I have tried figuring out the problem but I do not find any resources to resolve the issue. Tried every possible suggestion listed here and elsewhere. searched extensively. $ p11tool --list-all pkcs11:model=p11-kit-trust;manufacturer=PKCS%2311%20Kit;serial=1;token=System%20Trust $ p11tool --provider /usr/lib/libcryptoauth.so --list-all Object 1: $ p11tool --provider /usr/lib/libcryptoauth.so --initialize "pkcs11:serial=E42440B94379" --label aws-iot $ p11tool --list-tokens Token 1: $ p11tool --export-pubkey --provider /usr/lib/libcryptoauth.so "pkcs11:token=0123EE;object=device;type=private" $ openssl req -engine pkcs11 -key "pkcs11:token=0123EE;object=device;type=private" -keyform engine -new -out new_device.csr -subj "/CN=NEW CSR EXAMPLE" Can you let me know know if you resolved this problem and if yes, how. regards, |
Running
p11tool --initialize
on a new ATECC608a fails with: Error in pkcs11_init:1439: PKCS #11 error.
I provided the sample config. Running list-all shows a additional public key afterwards.
The full commands are those:
Why isn't this working?
The text was updated successfully, but these errors were encountered: