v0.49.0
Changes
This release fixes the regression in v0.48 which made it impossible to choose the hash algorithm when using RSA keys for authentication. Unfortunately, the fix is a breaking API change, hence the version bump.
client::Handle::authenticate_publickey
now takes a russh_keys::key::PrivateKeyWithHashAlg
which you can construct from an Arc<russh_keys::PrivateKey>
+ Option<russh_keys::HashAlg>
.
The latter lets you choose between SHA1, SHA256 and SHA512 for RSA keys, and must be None
for all other key types.
Example:
let key_pair = load_secret_key(key_path, None)?;
let auth_res = session
.authenticate_publickey(
user,
PrivateKeyWithHashAlg::new(Arc::new(key_pair), Some(HashAlg::Sha512))?
)
.await?;