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

rpc: Tighten attribute array check with manual enumeration #367

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

ueno
Copy link
Member

@ueno ueno commented Jun 3, 2021

CKF_ARRAY_ATTRIBUTE is not sufficient to tell if the attribute is
an array of attributes, because the flag is also set for
CKA_ALLOWED_MECHANISMS, which is an array of CK_MECHANISM_TYPE
(unsigned long). Moreover, our vendor prefix 0x58444700UL masks
the bit.

Signed-off-by: Daiki Ueno [email protected]

CKF_ARRAY_ATTRIBUTE is not sufficient to tell if the attribute is
an array of attributes, because the flag is also set for
CKA_ALLOWED_MECHANISMS, which is an array of CK_MECHANISM_TYPE
(unsigned long).  Moreover, our vendor prefix 0x58444700UL masks
the bit.

Signed-off-by: Daiki Ueno <[email protected]>
@ueno ueno force-pushed the wip/dueno/array-attributes branch from e437824 to 9bea0b1 Compare June 3, 2021 05:46
@coveralls
Copy link

coveralls commented Jun 3, 2021

Coverage Status

Coverage decreased (-0.003%) to 71.853% when pulling 9bea0b1 on ueno:wip/dueno/array-attributes into 96c7b93 on p11-glue:master.

@ueno ueno merged commit 0dd0182 into p11-glue:master Jun 3, 2021
@ueno ueno deleted the wip/dueno/array-attributes branch June 3, 2021 05:59
@ueno ueno added this to the 0.24.0 milestone Jun 3, 2021
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