fix: check ssh public keys correctly #634
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The original check worked by blind chance for ed25519 keys but now correctly checks public key file/format
- What I did
fixed bug in that RSA ssh keys were not seen as "valid" when using the '-s' flag on sshnp. The original code looked at the ssh public key file the code now looks at the format of the key once returned/processed by the dartssh2 package.
- How I did it
Check on dartssh2 package to which key formats are recognized and put in RgeEx to check those format strings
- How to verify it
Ran tests locally with broken rsa ssh key file which now works
- Description for the changelog
fixed error in ssh key checking when using the -s flag in sshnp