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

Passing an empty string to -x is treated as if it was never set #127

Closed
maflcko opened this issue Mar 4, 2023 · 1 comment
Closed

Passing an empty string to -x is treated as if it was never set #127

maflcko opened this issue Mar 4, 2023 · 1 comment

Comments

@maflcko
Copy link

maflcko commented Mar 4, 2023

Passing an empty string to -x will make it fall back to the default.

I am not entirely sure what to do here. For me, passing an empty string was by accident, so it was confusing to see a verified signature, and I'd prefer if the program failed. However, I can see how some users may see this as a "feature".

Another issue is that this behavior differs for rsign2:

$ minisign -Vm ./txt -x ""
Signature and comment signature verified
$ ~/.cargo/bin/rsign verify ./txt -x ""
could not read signature file : No such file or directory (os error 2)

Potential solutions:

  • Clarify in the docs that an empty string is treated as if no option was supplied
  • Change minisign or rsign2, so that they behave the same
  • Something else? ...
@jedisct1
Copy link
Owner

jedisct1 commented Mar 4, 2023

There's only one specification for the format, and implementations must be compatible with each other.

Now, regarding command-line flags or additional features, implementations can do whatever they want.

Trying do emulate other implementations is a pain, and I'm not sure it is worth it.

In the C implementation, -C changes the password, while in the Zig implementation, -C converts the key to an SSH key.

Is that an issue? I don't think it is. Pick one implementation and stick to it :) For a given tool, not having a command-line flag suddenly work differently seems preferable.

@jedisct1 jedisct1 closed this as completed Mar 4, 2023
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

No branches or pull requests

2 participants