-
Notifications
You must be signed in to change notification settings - Fork 84
Add support for PKCS#11 3.2 validation objects #306
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
de1c46f
to
5ad9e90
Compare
5ad9e90
to
abebfe3
Compare
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.
Looks good. I left the same nits as in other PRs so... please bear with me 😅
// SoftHSM does not support this attribute at all | ||
assert_eq!(attrs.len(), 0); | ||
} else { | ||
// Kryoptic supports the ObjectValidationFlag only if it is built as a FIPS provider |
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.
🤔 is it possible to built it this way for our CI? I think it'd be cool to have some real results here :)
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.
Sure. But its slow as it builds also the whole OpenSSL :) I was trying this locally and there are some more limitations and corner cases, which do not work or work differently and which we would have to workaround. But with the validation API, it should be quite easy to distinguish the FIPS and non-FIPS kryoptic version.
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.
Added the FIPS build of kryoptic and adjusted the tests to work with it. The build is slow, but after OpenSSL build will be cached, it should be faster (but still slower than other tests).
c4eba0f
to
dce5711
Compare
0787d51
to
9080717
Compare
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
9080717
to
a5db2de
Compare
The PKCS#11 3.2 introduces a way to query the session for the validation flags of the last operation. This is done with the new API
C_GetSessionValidationFlags
which is being exposed now also to the users of this crate.It also defines the new attribute specifying if the given object is matching the requirements for the validation.
Last but not least there is new validation object exposing information about the validation itself.
There is currenly almost no coverage for these, as this is implemented only by kryoptic (as far as I know) and not enabled in the default build we are using in CI.
Opening as draft as it depends on some fixes in kryoptic (latchset/kryoptic#315) as well its based on other code changes here (#304).