diff --git a/russh/src/client/encrypted.rs b/russh/src/client/encrypted.rs index 42e4335c..2c124bfc 100644 --- a/russh/src/client/encrypted.rs +++ b/russh/src/client/encrypted.rs @@ -907,7 +907,7 @@ impl Encrypted { match key { PublicKeyOrCertificate::Certificate(cert) => { - cert.algorithm().encode(buffer)?; + cert.algorithm().to_certificate_type().encode(buffer)?; cert.to_bytes()?.encode(buffer)?; } PublicKeyOrCertificate::PublicKey { key, hash_alg } => {