Skip to content

Conversation

@chinglee-iot
Copy link
Member

@chinglee-iot chinglee-iot commented May 7, 2024

The tested platform may already be pre-provisioned with keys other than those provided in the test. The PKCS11_RSA_GetAttributeValue test may fail to verify the RSA pre-provisioning mechanism under this scenario.

In this PR:

  • Add PKCS11_TEST_RSA_CERTIFICATE and PKCS11_TEST_RSA_CERTIFICATE_TEST for platform with preprovisioned RSA key.
  • Since the preprovisioned certificate is also provided int the test through these two macros. We can also verify the certificate acquired through pkcs11 API is the same as the certificate pre-provisioned now. The condition to check provision method is removed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

* Not checking key length for imported RSA key
* No double confirm with mbedtls if private key is not provided
* PKCS11_TEST_RSA_CERTIFICATE and PKCS11_TEST_RSA_CERTIFICATE_LENGTH
  must be provided to verify RSA preprovision mechanism
moninom1
moninom1 previously approved these changes May 9, 2024
@chinglee-iot chinglee-iot merged commit 692d509 into FreeRTOS:main May 17, 2024
@chinglee-iot chinglee-iot deleted the fix-rsa-import-key-attribute-test branch May 17, 2024 09:12
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

Successfully merging this pull request may close these issues.

2 participants