1148118271 / ssh-rs

Rust implementation of ssh2.0 client 👻 rust实现的ssh2.0客户端
https://docs.rs/ssh-rs/
MIT License
144 stars 27 forks source link

Excessive use of unchecked unwraps #100

Open yaleman opened 2 months ago

yaleman commented 2 months ago

Example: get_blob(&self, alg: &PubKey) -> Vec<u8>

This has unwraps for values that could be None so rather than checking for error states it just causes consumers to panic. It really shouldn't be used like this, rather the return of get_blob should be a Result type...

I'm somehow triggering this because it can't read one of my (perfectly valid) ssh keys properly, which is strange 😢

yaleman commented 2 months ago

I figured out what the issue likely is - the key has a passphrase which there's seemingly no way to configure in this library?