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

Fix deleting NSSDB objects #129

Merged
merged 3 commits into from
Dec 11, 2024
Merged

Fix deleting NSSDB objects #129

merged 3 commits into from
Dec 11, 2024

Conversation

Jakuje
Copy link
Contributor

@Jakuje Jakuje commented Dec 11, 2024

This is mostly my naive approach. Not sure if there is a better way or better place where this could be handled.

Copy link
Member

@simo5 simo5 left a comment

Choose a reason for hiding this comment

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

do you think it would be overly hard to get the default defined in the object factory (the one applied when objects are created)

src/storage/nssdb/mod.rs Outdated Show resolved Hide resolved
The SKIP_ATTRIBUTES are not stored in the NSS DB. When constructing the
queries, these need to be skipped otherwise they will reference
non-existing table columns and fail on the DB level.

But the application is asking for them so we need to mock the default
values back when returning from fetch().

This demonstrated when destroying a token objects, which checks if the
object has the CKA_DESTROYABLE attribute.

Signed-off-by: Jakub Jelen <[email protected]>
This allows to fill specific attributes with the defined default
value for the specific object type.
If the object does not have a default value for the requested
attribute nothing it set on the object.

Signed-off-by: Simo Sorce <[email protected]>
@simo5
Copy link
Member

simo5 commented Dec 11, 2024

Rebased on main and pushed a patch that addresses my request.
Plwase counter-review

Copy link
Contributor Author

@Jakuje Jakuje left a comment

Choose a reason for hiding this comment

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

I can not approve my PR, but your changes look good.

@simo5 simo5 merged commit dfb480a into latchset:main Dec 11, 2024
19 checks passed
@simo5
Copy link
Member

simo5 commented Dec 11, 2024

Great thanks!

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