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 handling of prefix type in login CLI #176

Merged
merged 1 commit into from
Jun 24, 2024
Merged

Conversation

vvidic
Copy link
Collaborator

@vvidic vvidic commented Mar 7, 2024

Key index is the common case we want to support here:

If the MSB is set, the low bits are interpreted as a 7 bit integer, which the server should interpret as the index of the key its supposed to use.

@vvidic vvidic requested review from burgerdev and pkern March 7, 2024 21:21
Copy link
Collaborator

@burgerdev burgerdev left a comment

Choose a reason for hiding this comment

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

I believe the reasoning was that we only have one key at the command line, so we can't pick one by index and should rather just accept the prefix indicator. I'd also have expected an MSB check further down, but don't see it.

However, when I'm already despreate enough to use the CLI for verification, I probably don't care whether it's index or prefix, and rather want the tool to just produce a tag with the given key.

How about we accept any index without check, but do the MSB check when it's a prefix?

@vvidic
Copy link
Collaborator Author

vvidic commented Mar 19, 2024

Updated as suggested, please check.

Copy link
Collaborator

@burgerdev burgerdev left a comment

Choose a reason for hiding this comment

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

Thanks!

cli/commands.c Outdated Show resolved Hide resolved
Accept any index without a check or do a MSB check with the public key.
Copy link
Member

@pkern pkern left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@pkern pkern merged commit 1495a49 into google:master Jun 24, 2024
8 checks passed
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.

3 participants