Skip to content

Error when compiling ssh-key 0.7.0 #562

Description

@p-b-b

Steps to reproduce:

cargo init
cargo add ssh-key@=0.7.0-rc.10
cargo build

Gives the following error:

  Compiling typenum v1.20.1
   Compiling base64ct v1.8.3
   Compiling cmov v0.5.4
   Compiling zeroize v1.9.0
   Compiling cpufeatures v0.3.0
   Compiling cfg-if v1.0.4
   Compiling base16ct v1.0.0
   Compiling rand_core v0.10.1
   Compiling signature v3.0.0
   Compiling ctutils v0.4.2
   Compiling pem-rfc7468 v1.0.0
   Compiling hybrid-array v0.4.13
   Compiling crypto-common v0.2.2
   Compiling block-buffer v0.12.1
   Compiling inout v0.2.2
   Compiling sec1 v0.8.1
   Compiling digest v0.11.3
   Compiling cipher v0.5.2
   Compiling sha2 v0.11.0
   Compiling ssh-encoding v0.3.0
   Compiling ssh-cipher v0.3.0
   Compiling ssh-key v0.7.0-rc.10
error[E0599]: the variant or associated item `decode` exists for enum `Cipher`, but its trait bounds were not satisfied
   --> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ssh-key-0.7.0-rc.10/src/private.rs:816:30
    |
816 |         let cipher = Cipher::decode(reader)?;
    |                              ^^^^^^ variant or associated item cannot be called on `Cipher` due to unsatisfied trait bounds
    |
   ::: /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ssh-cipher-0.3.0/src/lib.rs:117:1
    |
117 | pub enum Cipher {
    | --------------- doesn't satisfy `Cipher: Decode` or `Cipher: ssh_encoding::Label`
    |
    = note: the following trait bounds were not satisfied:
            `Cipher: ssh_encoding::Label`
            which is required by `Cipher: Decode`
            `&Cipher: ssh_encoding::Label`
            which is required by `&Cipher: Decode`
            `&mut Cipher: ssh_encoding::Label`
            which is required by `&mut Cipher: Decode`

error[E0599]: the method `encoded_len` exists for enum `Cipher`, but its trait bounds were not satisfied
   --> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ssh-key-0.7.0-rc.10/src/private.rs:904:25
    |
904 |             self.cipher.encoded_len()?,
    |                         ^^^^^^^^^^^ method cannot be called on `Cipher` due to unsatisfied trait bounds
    |
   ::: /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ssh-cipher-0.3.0/src/lib.rs:117:1
    |
117 | pub enum Cipher {
    | --------------- doesn't satisfy `Cipher: Encode` or `Cipher: ssh_encoding::Label`
    |
    = note: the following trait bounds were not satisfied:
            `Cipher: ssh_encoding::Label`
            which is required by `Cipher: Encode`

error[E0599]: the method `encode` exists for enum `Cipher`, but its trait bounds were not satisfied
   --> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ssh-key-0.7.0-rc.10/src/private.rs:916:21
    |
916 |         self.cipher.encode(writer)?;
    |                     ^^^^^^ method cannot be called on `Cipher` due to unsatisfied trait bounds
    |
   ::: /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ssh-cipher-0.3.0/src/lib.rs:117:1
    |
117 | pub enum Cipher {
    | --------------- doesn't satisfy `Cipher: Encode` or `Cipher: ssh_encoding::Label`
    |
    = note: the following trait bounds were not satisfied:
            `Cipher: ssh_encoding::Label`
            which is required by `Cipher: Encode`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `ssh-key` (lib) due to 3 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions