-
Notifications
You must be signed in to change notification settings - Fork 662
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
nvme: add support to revoke TLS key #2387
Merged
Merged
Conversation
This file contains 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
ikegami-t
reviewed
Jul 2, 2024
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.
completions not added.
ikegami-t
reviewed
Jul 3, 2024
igaw
changed the title
nvme: add support to remove TLS key
nvme: add support to revoke TLS key
Jul 4, 2024
igaw
commented
Jul 5, 2024
Fetch nvme_revoke_tls_key. Signed-off-by: Daniel Wagner <[email protected]>
The export command should use stdout as default output as documentation claims. Furthermore, it should open the keyfile to write in write mode. Signed-off-by: Daniel Wagner <[email protected]>
When exporting a TLS keys from the kernel keyring a line might have a newline. Strip the newline away as the nvme_import_tls_key is not expecting it and thus fails to load an exported keyfile. Signed-off-by: Daniel Wagner <[email protected]>
The tls_key function is using a STREAM object and closes it when leaving the context. Update it to use the helper. Signed-off-by: Daniel Wagner <[email protected]>
discover_from_conf_file uses a STREAM. Let's use the cleanup helper to close it. Signed-off-by: Daniel Wagner <[email protected]>
write_file uses a STREAM. Let's use the cleanup helper to close it. Signed-off-by: Daniel Wagner <[email protected]>
io_mgmt_send uses a file descriptor. Let's use the cleanup helper to close it. Signed-off-by: Daniel Wagner <[email protected]>
Split the command line option handling code from the operation. Signed-off-by: Daniel Wagner <[email protected]>
ikegami-t
reviewed
Jul 5, 2024
Propagate error codes for TLS commands. Also print an error message when scanning TLS keys. Signed-off-by: Daniel Wagner <[email protected]>
Add support to nvme-cli to revoke TLS keys from a keyring. Signed-off-by: Daniel Wagner <[email protected]>
Sort the file names alphabetically. Signed-off-by: Daniel Wagner <[email protected]>
The shorthand for --keyfile is -f and not -k. Signed-off-by: Daniel Wagner <[email protected]>
Add the --revoke option to the tls-key documentation. While at it, add examples how to use it. Signed-off-by: Daniel Wagner <[email protected]>
The tls-key command is missing support for the zsh and bash completion. Signed-off-by: Daniel Wagner <[email protected]>
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.
Add support to nvme-cli to remove TLS keys from a keyring.
I've decided to add the remove option to the
tls-key
command because adding it togen-tls-key
or
check-tls-key
seems wrong.tls-key
support import/export operation while the other two command name indicate for what they are should be used. The import option forcheck-tls-key
is already wrong IMO. But let's keep it for backwards compatibility.Fixes: #2365
Depends: linux-nvme/libnvme#856