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

Cryptoki - CKR_ARGUMENTS_BAD connecting MQTT with pkcs11 using ATECC608B #362

Closed
qcabrol opened this issue Feb 16, 2024 · 1 comment
Closed
Labels

Comments

@qcabrol
Copy link

qcabrol commented Feb 16, 2024

Describe the bug
When calling the sample script 'pkcs11_connect.py'

  • the crypto element ATEC608B answers correctly and the provisioned private key is found
  • The sample script exits with AWS_ERROR_PKCS11_CKR_ARGUMENTS_BAD

awscrt.exceptions.AwsCrtError: AWS_ERROR_PKCS11_CKR_ARGUMENTS_BAD: A PKCS#11 (Cryptoki) library function failed with return value CKR_ARGUMENTS_BAD Error AWS_ERROR_PKCS11_CKR_ARGUMENTS_BAD when connecting MQTT with pkcs11 using secure element ATECC608B

Also referred to here:
OpenSC/libp11#524
aws/aws-iot-device-sdk-python-v2#561

aws-sdk2-edited.log

Expected Behavior
The device connects (or attempts to connect) to the AWS IoT without a PKCS error.

Current Behavior
See description of the bug above

Reproduction Steps
ATECC608B crypto element on i2c0 bus with provisioned private key and securely booted
libcryptoauth v3.4.0 from Microchip
lipb11 0.4.11
aws-iot-device-sdk-python-v2 1.21.0
run (adapt parameters to the provisioned private key label, actual endpoint ...):
python3 pkcs11_connect.py --endpoint a***************-ats.iot.eu-central-1.amazonaws.com --cert ~/app/prod/res/gateway_cert.crt --pkcs11_lib /usr/lib/libcryptoauth.so --token_label 00ABC --key_label device --client_id my_device_id --port 8883 --ca_file ~/app/prod/res/root.pem --pin 1234 --verbosity Debug

Environment details (OS name and version, etc.)
Yocto Kirkstone on ARM: Linux sam9x60-curiosity-sd 6.1.55-linux4microchip-2023.10

Copy link

This issue has been marked as stale - please confirm the issue still exists with the latest version of the library and update the issue if it remains

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant