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

CKA_ID support to enable Java / Greengrass V2 #291

Merged
merged 3 commits into from
Apr 15, 2022

Conversation

JamieHunter
Copy link
Contributor

Please describe the purpose of this pull request

CKA_ID feature by bryan-hunt
Tested, and minor fixes in pkcs11_cert_get_subject_key_id as Java makes an initial call with null pointer to obtain buffer size

Checklist

}
else
{
rv = pkcs11_attrib_fill(pAttribute, NULL, ATCA_SHA1_DIGEST_SIZE);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If pValue is null, this needs to fill in expected length, I'll send an update PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkcs11_attrib_fill is a utility function that has all of the require logic implemented: https://github.com/MicrochipTech/cryptoauthlib/blob/main/lib/pkcs11/pkcs11_attrib.c#L52-L91 so there is no need to check pAttribute->pValue or to manually set the length under most circumstances.

@bryan-hunt bryan-hunt merged commit 9a37b8d into MicrochipTech:main Apr 15, 2022
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