Repository navigation
Delete a data object on PUT DATA with an empty object - #55
Open
FlorianFranzen wants to merge 1 commit into
Open
FlorianFranzen wants to merge 1 commit into
FlorianFranzen wants to merge 1 commit into
Conversation
Contributor
Author
|
Heads-up for whichever of #52 and #55 lands second: #55's test deletes a retired certificate and then expects the key history object to come back as the synthesised empty one ( |
FlorianFranzen
added a commit
to FlorianFranzen/piv-authenticator
that referenced
this pull request
Oct 16, 2026
- 42fdab7 Delete a data object on PUT DATA with an empty object
FlorianFranzen
added a commit
to FlorianFranzen/piv-authenticator
that referenced
this pull request
Oct 16, 2026
…s test still reads back
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PUT DATA with an empty object stored a zero-length file, and the following GET DATA answered 9000 with an empty object. On a YubiKey the empty PUT DATA is the delete primitive: yubikit's
delete_certificateisput_object(id)with no data, and ykman then expects the object to be absent. An empty object now removes the stored file, and for a PIN-protected object its sealed key file as well, so GET DATA answers NotFound afterwards and a deleted retired certificate no longer counts in the key history object. Objects with a built-in default (CCC, printed information, discovery object) serve that default again; the CHUID, which is written at initialization, answers NotFound once deleted instead of hitting thepanic!that guarded its default.Tested in
command_response.ron: delete of a certificate object, of a retired certificate as seen through the key history, of a PIN-protected object, and of the CHUID.