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

wolfSSH Client with OpenSSH-format Keys #604

Merged
merged 9 commits into from
Nov 17, 2023

Conversation

ejohnstown
Copy link
Contributor

  1. Move the KeySignature struct around in internal.c so it can be used for a couple tasks.
  2. Add decoder for the OpenSSH-format keys.
  3. Add an identification function for the new key.
  4. Update ReadKey to handle the new format.

@ejohnstown ejohnstown force-pushed the wolfssh-client-2 branch 2 times, most recently from 2a5da5f to ca6c50d Compare October 16, 2023 23:45
src/internal.c Outdated Show resolved Hide resolved
src/internal.c Outdated Show resolved Hide resolved
src/internal.c Outdated Show resolved Hide resolved
src/internal.c Outdated Show resolved Hide resolved
src/internal.c Outdated Show resolved Hide resolved
src/internal.c Show resolved Hide resolved
src/ssh.c Show resolved Hide resolved
src/ssh.c Outdated Show resolved Hide resolved
src/ssh.c Outdated Show resolved Hide resolved
src/ssh.c Show resolved Hide resolved
Copy link
Contributor

@JacobBarthelmeh JacobBarthelmeh left a comment

Choose a reason for hiding this comment

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

Code changes look good. Thanks John! Only other thing is I see there is not a test yet. Hoping that we can add one of the keys to the wolfssh/keys directory and a basic test case.

@ejohnstown ejohnstown force-pushed the wolfssh-client-2 branch 3 times, most recently from 97a41f5 to 1c33924 Compare November 6, 2023 21:52
1. Move the KeySignature struct around in internal.c so it can be used
   for a couple tasks.
2. Add decoder for the OpenSSH-format keys.
3. Add an identification function for the new key.
4. Update ReadKey to handle the new format.
1. Add two error codes for the new key format decoding.
2. Add in some better error and bound checking.
3. Fix ordering on a WOLFSSH_UNUSED and variable declaration.
4. Remove redundant ; from WOLFSSH_UNUSED function-like macro.
1. Add better error checking to the OpenSSH key code.
2. Add a couple heaps that were missing.
1. Change the block size in the key decoding to a named constant rather
   than a bare number.
2. Change the comparison from a difference of two unsigned values
   against zero to comparing them directly.
@ejohnstown ejohnstown force-pushed the wolfssh-client-2 branch 2 times, most recently from 66d6c9a to d191292 Compare November 6, 2023 22:19
1. Add test keys.
2. Add API test for wolfSSH_ReadKey_buffer().
3. Fix allocation issue found using the API test.
@ejohnstown ejohnstown removed their assignment Nov 6, 2023
JacobBarthelmeh
JacobBarthelmeh previously approved these changes Nov 7, 2023
1. Rename and move CleanupUserAuthRequestPublicKey() as
   wolfSSH_KEY_clean().
2. Restrict the number of keys allowed in an OpenSSH key package to 1.
3. Initialize the Rsa and Ecc keys right before getting them.
4. New error code for an OpenSSH key format error when decoding.
@JacobBarthelmeh JacobBarthelmeh merged commit b7aaabc into wolfSSL:master Nov 17, 2023
9 checks passed
@ejohnstown ejohnstown deleted the wolfssh-client-2 branch November 17, 2023 19:50
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.

2 participants