-
Notifications
You must be signed in to change notification settings - Fork 85
Fix handling empty AllowedMechanisms attribute #324
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
base: main
Are you sure you want to change the base?
Conversation
03f686d to
a2ac816
Compare
a2ac816 to
32243e0
Compare
|
OTOH this could be considered a softhsm bug (or at least oddness) and as a rust-cryptoki, we might want to shield a users from such pkcs11-module-specific issues. But then we would have to filter this out early in get_attributes, which does not sound great either. |
|
You already pointed out that at least two attributes can definitely be zero length. It thus seems like a bug in |
Validity rules for reads explicitly point out that:
I'm okay with the change here, with a bit of docs around it, since at first sight it looks like a premature optimization 🤔 |
That's not the only relevant thing. From slice::from_raw_parts:
And that's the bug that we are seeing. |
32243e0 to
84339fb
Compare
neverpanic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo, rest lg2m.
As returned by SoftHSM: softhsm/SoftHSMv2#825 Fixes: parallaxsecond#323 Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
84339fb to
0204b08
Compare
As returned by SoftHSM: softhsm/SoftHSMv2#825
Fixes: #323