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

Add newline to PublicKey::write_openssh_file output #188

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

tarcieri
Copy link
Member

Also adds an integration test to ensure that the file output matches what ssh-keygen generates byte-for-byte.

The ToString impl still omits the newline.

To avoid making breaking changes, it always uses \n as the newline, however perhaps in a future breaking release it could be changed to accept LineEnding so as to match PrivateKey::write_openssh_file.

Fixes #187.

Also adds an integration test to ensure that the file output matches
what `ssh-keygen` generates byte-for-byte.

The `ToString` impl still omits the newline.

To avoid making breaking changes, it always uses `\n` as the newline,
however perhaps in a future breaking release it could be changed to
accept `LineEnding` so as to match `PrivateKey::write_openssh_file`.
@tarcieri tarcieri force-pushed the add-newline-to-public-key-files branch from 4fc9264 to ab2531f Compare December 19, 2023 19:44
@tarcieri tarcieri merged commit 56481bb into master Dec 19, 2023
13 checks passed
@tarcieri tarcieri deleted the add-newline-to-public-key-files branch December 19, 2023 20:32
@cloudhead
Copy link

Thanks!

@tarcieri tarcieri mentioned this pull request Jan 12, 2024
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.

ssh-key doesn't add newline in file
2 participants