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 loading keys with comments starting with a space. #52

Open
dumol opened this issue Feb 1, 2021 · 5 comments
Open

Fix loading keys with comments starting with a space. #52

dumol opened this issue Feb 1, 2021 · 5 comments

Comments

@dumol
Copy link
Contributor

dumol commented Feb 1, 2021

$ echo 'password' > pass_file
$ puttygen -t ed25519 -C " comment" --new-passphrase pass_file -o putty_ed25519_private.key
$ ./build-keycert/bin/python keycert-demo.py ssh-load-key --file putty_ed25519_private.key  --type putty --password $(cat pass_file)
EXPECTED ERROR
Bad password or HMAC mismatch.

Interestingly, this generated an expected error…

@adiroiban
Copy link
Member

For the record, there is also #51 ... for generating keys with non-ascii

They might be fixed together as might be generated by the same bug.

But for now we can have separate issues. Thanks!

@dumol
Copy link
Contributor Author

dumol commented Feb 2, 2021

Well, a blank space is an ASCII character… Interestingly, blank spaces work fine if they are placed somewhere else inside the comment. I've only seen this error when a blank space is at the beginning of a comment for a key to be loaded.

@adiroiban
Copy link
Member

True. Thanks. This should be fixed

@dumol
Copy link
Contributor Author

dumol commented Feb 2, 2021

OK, thanks! But where? The use-cryptography-take2 branch currently exhibits this problem.

@adiroiban
Copy link
Member

Ah... sorry. This should be fixed in the future :) So this ticket is valid. Thanks :) and sorry for the confusion.

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