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

Use shared Data folder for client keys in integration tests #1219

Merged
merged 7 commits into from
Nov 12, 2023

Conversation

Rob-Hague
Copy link
Collaborator

And some related test changes (see the commit messages for details). These changes make my life easier in some related feature development.

@Rob-Hague Rob-Hague force-pushed the testkeys branch 2 times, most recently from b21c822 to 0061ef3 Compare October 26, 2023 11:16
@Rob-Hague
Copy link
Collaborator Author

@drieseng @WojciechNagorski could you kindly review/merge these test changes? It helps me with some work related to certificates.

The context is, there can be lots of combinations of keys used to create certificates. It would be cumbersome to generate and test certificates independently for the unit and integration test projects.

The other commits are to remove friction in working with the test keys with various tools

Change the data to be in 64-wide columns instead of 70, and add a newline
at the end of the file. ssh-keygen does not like it otherwise.

puttygen Key.OPENSSH.ECDSA.Encrypted.txt -O private-openssh-new -C Key.OPENSSH.ECDSA.Encrypted
puttygen Key.OPENSSH.ECDSA.txt -O private-openssh-new -C Key.OPENSSH.ECDSA
puttygen Key.OPENSSH.ECDSA384.Encrypted.txt -O private-openssh-new -C Key.OPENSSH.ECDSA384.Encrypted
puttygen Key.OPENSSH.ECDSA384.txt -O private-openssh-new -C Key.OPENSSH.ECDSA384
puttygen Key.OPENSSH.ECDSA521.Encrypted.txt -O private-openssh-new -C Key.OPENSSH.ECDSA521.Encrypted
puttygen Key.OPENSSH.ECDSA521.txt -O private-openssh-new -C Key.OPENSSH.ECDSA521
puttygen Key.OPENSSH.ED25519.Encrypted.txt -O private-openssh-new -C Key.OPENSSH.ED25519.Encrypted
puttygen Key.OPENSSH.ED25519.txt -O private-openssh-new -C Key.OPENSSH.ED25519
puttygen Key.OPENSSH.RSA.Encrypted.txt -O private-openssh-new -C Key.OPENSSH.RSA.Encrypted
puttygen Key.OPENSSH.RSA.txt -O private-openssh-new -C Key.OPENSSH.RSA

(the -C flag changes the comment, otherwise puttygen refuses to do anything)
Generated with

puttygen Key.OPENSSH.ECDSA.Encrypted.txt -o Key.OPENSSH.ECDSA.Encrypted.pub -O public-openssh
puttygen Key.OPENSSH.ECDSA.txt -o Key.OPENSSH.ECDSA.pub -O public-openssh
puttygen Key.OPENSSH.ECDSA384.Encrypted.txt -o Key.OPENSSH.ECDSA384.Encrypted.pub -O public-openssh
puttygen Key.OPENSSH.ECDSA384.txt -o Key.OPENSSH.ECDSA384.pub -O public-openssh
puttygen Key.OPENSSH.ECDSA521.Encrypted.txt -o Key.OPENSSH.ECDSA521.Encrypted.pub -O public-openssh
puttygen Key.OPENSSH.ECDSA521.txt -o Key.OPENSSH.ECDSA521.pub -O public-openssh
puttygen Key.OPENSSH.ED25519.Encrypted.txt -o Key.OPENSSH.ED25519.Encrypted.pub -O public-openssh
puttygen Key.OPENSSH.ED25519.txt -o Key.OPENSSH.ED25519.pub -O public-openssh
puttygen Key.OPENSSH.RSA.Encrypted.txt -o Key.OPENSSH.RSA.Encrypted.pub -O public-openssh
puttygen Key.OPENSSH.RSA.txt -o Key.OPENSSH.RSA.pub -O public-openssh

and so forth. Some whose ciphers are unsupported by puttygen were generated with e.g.

sudo ssh-keygen -f Key.RSA.Encrypted.Des.CBC.12345.txt -y > Key.RSA.Encrypted.Des.CBC.12345.pub
@WojciechNagorski
Copy link
Collaborator

I will check it.

@drieseng drieseng merged commit 5ffcb94 into sshnet:develop Nov 12, 2023
1 check passed
@Rob-Hague Rob-Hague deleted the testkeys branch November 12, 2023 16:04
@Rob-Hague
Copy link
Collaborator Author

Thanks!

@WojciechNagorski
Copy link
Collaborator

@Rob-Hague Great job! @drieseng Thanks for review :)

@WojciechNagorski WojciechNagorski added this to the 2023.0.1 milestone Nov 16, 2023
@WojciechNagorski
Copy link
Collaborator

The 2023.0.1 version has been released to Nuget: https://www.nuget.org/packages/SSH.NET/2023.0.1

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