Fix decoding PKCS#8 key DER regression (#51) #143
Annotations
4 errors
|
no function or associated item named `from_pkcs8_der` found for struct `common::crypto::rust_crypto::Ed25519Key` in the current scope:
src/dkim/generate.rs#L45
error[E0599]: no function or associated item named `from_pkcs8_der` found for struct `common::crypto::rust_crypto::Ed25519Key` in the current scope
--> src/dkim/generate.rs:45:31
|
45 | let key = Ed25519Key::from_pkcs8_der(&pkcs8_der).unwrap();
| ^^^^^^^^^^^^^^ function or associated item not found in `common::crypto::rust_crypto::Ed25519Key`
|
::: src/common/crypto/rust_crypto.rs:85:1
|
85 | pub struct Ed25519Key {
| --------------------- function or associated item `from_pkcs8_der` not found for this struct
|
note: if you're trying to build a new `common::crypto::rust_crypto::Ed25519Key`, consider using `common::crypto::rust_crypto::Ed25519Key::from_bytes` which returns `std::result::Result<common::crypto::rust_crypto::Ed25519Key, Error>`
--> src/common/crypto/rust_crypto.rs:91:5
|
91 | pub fn from_bytes(private_key_bytes: &[u8]) -> crate::Result<Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `from_pkcs8_der`, perhaps you need to implement it:
candidate #1: `rsa::pkcs8::DecodePrivateKey`
|
|
type annotations needed:
src/dkim/generate.rs#L44
error[E0282]: type annotations needed
--> src/dkim/generate.rs:44:51
|
44 | Ed25519Key::generate_pkcs8().map_err(|err| Error::CryptoError(err.to_string()))?;
| ^^^ --- type must be known at this point
|
help: consider giving this closure parameter an explicit type
|
44 | Ed25519Key::generate_pkcs8().map_err(|err: /* Type */| Error::CryptoError(err.to_string()))?;
| ++++++++++++
|
|
no function or associated item named `generate_pkcs8` found for struct `common::crypto::rust_crypto::Ed25519Key` in the current scope:
src/dkim/generate.rs#L44
error[E0599]: no function or associated item named `generate_pkcs8` found for struct `common::crypto::rust_crypto::Ed25519Key` in the current scope
--> src/dkim/generate.rs:44:25
|
44 | Ed25519Key::generate_pkcs8().map_err(|err| Error::CryptoError(err.to_string()))?;
| ^^^^^^^^^^^^^^ function or associated item not found in `common::crypto::rust_crypto::Ed25519Key`
|
::: src/common/crypto/rust_crypto.rs:85:1
|
85 | pub struct Ed25519Key {
| --------------------- function or associated item `generate_pkcs8` not found for this struct
|
note: if you're trying to build a new `common::crypto::rust_crypto::Ed25519Key`, consider using `common::crypto::rust_crypto::Ed25519Key::from_bytes` which returns `std::result::Result<common::crypto::rust_crypto::Ed25519Key, Error>`
--> src/common/crypto/rust_crypto.rs:91:5
|
91 | pub fn from_bytes(private_key_bytes: &[u8]) -> crate::Result<Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
build
Clippy had exited with the 101 exit code
|