Pure-Rust asynchronous SSH library, both client and server

#81 Support NIST-P256 public keys

Closed on May 15, 2023
Figment on May 15, 2023

thrussh_keys::parse_public_key_base64 fails to parse a P256 key with the error:

Err value: CouldNotReadKey’, thrussh-keys/src/lib.rs:522:10

This seems to be after parsing the base64 data, due to some length mismatch.

Figment added a change on May 15, 2023
Add test for ecdsa public key by yiCgiG9J74G4ex6ZKDw4JbNjyVQgmNaCFi5BLcYdzci,
Y2367J3DB32IDKAOC55NLY34VOQ6N2ZDZBCOGXD6FWI7SB2HKK4AC
main
Figment on May 15, 2023

I’ve attached a failing test case.

pmeunier on May 15, 2023

I believe @Robin_Jadoul could be interested.

Robin_Jadoul added a change on May 15, 2023
LLGVFVFCZMGNQCOQ5SPR5W7TG4ZB432ET6YJRWXNJL2CCUVAH6RAC
main
Robin_Jadoul on May 15, 2023

Thanks for finding this, I could correctly connect to an ssh server with a p256 key, so I thought it’d be fine, but there’s some code duplication or overlapping functionality (e.g. PublicKey::parse vs parse_public_key), leading to this particular function not being exercised properly. Should be fixed with the above change

pmeunier on May 15, 2023

Fixed and published, thank you both!

pmeunier closed this discussion on May 15, 2023