-
Notifications
You must be signed in to change notification settings - Fork 87
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.
84339fb to
0204b08
Compare
hug-dev
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.
Thanks for the fix and the comment ⭐
|
@wiktor-k can you have a look and approve if this looks ok? |
wiktor-k
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.
I think this looks good 👌 a couple of small suggestions, if you don't mind.
Btw, thanks for the ping, quite a lot on the plate recently 😅
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>
0204b08 to
780b7a2
Compare
|
oh, no. Something in the ubuntu broke the installation of the 32b arch softhsm ... |
|
Is it this line failing? Might be ok to ignore for now... |
Hard to say. Would have to try that locally or to get more information from the CI. I am also curious about the kryoptic failure that was not there in #328, in CI which ran last week. |
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
As returned by SoftHSM: softhsm/SoftHSMv2#825
Fixes: #323