Skip to content

Known Hosts#620

Merged
JacobBarthelmeh merged 5 commits intowolfSSL:masterfrom
ejohnstown:known-hosts
Nov 27, 2023
Merged

Known Hosts#620
JacobBarthelmeh merged 5 commits intowolfSSL:masterfrom
ejohnstown:known-hosts

Conversation

@ejohnstown
Copy link
Copy Markdown
Contributor

Added Known Hosts file checking for the wolfssh application. It currently checks the file "~/.ssh/known_hosts". Reports missing, duplicate, or bad keys.

1. Added support to the wolfSSH client for a known hosts file.
2. In the client's common.c file, moved the functions ato32() and
   load_der_file() around so the known hosts callback can uses them.
1. Comment out the original known hosts check for another method.
2. Implement new key checking method.
1. Update the logic for checking the key name and key against the known
   hosts file.
2. Key fingerprinting for user confirmation.
3. Add user confirmation of host key additions.
4. Remove old debugging for known hosts.
1. Add porting layer wrapper macros for strcat, strcpy, and strsep.
2. Use port layer macros for the known hosts additions.
Comment thread apps/wolfssh/common.c Outdated
Comment thread apps/wolfssh/common.c Outdated
Comment thread apps/wolfssh/common.c Outdated
Comment thread apps/wolfssh/common.c Outdated
Comment thread apps/wolfssh/common.c
1. Fix a few stdC function calls to use the porting wrappers.
2. Missing some error checking, added it.
3. Add some bounds checking to the sz usage when checking for the
   server's key in the known hosts file.
4. Move the temp buffers from the stack to the heap.
5. Make sure to nul terminate the read known_hosts file.
@JacobBarthelmeh JacobBarthelmeh merged commit 0c6d34f into wolfSSL:master Nov 27, 2023
@ejohnstown ejohnstown deleted the known-hosts branch November 30, 2023 21:24
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