Skip to content

Added support for ext-info-in-auth@openssh.com extension

Vivek Panchagnula requested to merge vrpT14s/libssh-mirror:master into master

Added support for ext-info-in-auth@openssh.com extension as specified in "PROTOCOL" in OpenSSH: https://github.com/openssh/openssh-portable/blob/8241b9c0529228b4b86d88b1a6076fb9f97e4a99/PROTOCOL#L166

Related to Issue 226: #226

Need to add tests, haven't because I don't how to add them yet, and also still have to understand some more things about the codebase and SSH. Wanted some feedback to make sure I'm not doing anything obviously wrong.

I deleted a line I thought that didn't do anything (because the enum it was setting was set again right after). Thoughts?

Edit: I realized I didn't notice the #endif, so my code on the client side for checking for ext-info-s will be disabled in case "WITH_SERVER" is turned off. I also forgot to drop the extension from the kex algorithm list later, because of this if the client sends an ext-info-s, there's a chance we end up negotiating that to be our key exchange type (which is clearly meaningless). Fortunately if that did happen it would cause an error later down the line so this wouldn't lead to insecure access. Clearly I jumped the gun with this MR, will fix this once I've properly read the codebase and the testing framework.

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • Code modified for feature
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated

Reviewer's checklist:

  • Any issues marked for closing are addressed
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTING.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by Vivek Panchagnula

Merge request reports