We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
core::error::Error
Error
1 parent 26a7708 commit 8635e59Copy full SHA for 8635e59
1 file changed
pkcs8/src/error.rs
@@ -47,8 +47,17 @@ impl fmt::Display for Error {
47
}
48
49
50
-#[cfg(feature = "std")]
51
-impl std::error::Error for Error {}
+impl core::error::Error for Error {
+ fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
52
+ match self {
53
+ Error::Asn1(err) => Some(err),
54
+ #[cfg(feature = "pkcs5")]
55
+ Error::EncryptedPrivateKey(err) => Some(err),
56
+ Error::PublicKey(err) => Some(err),
57
+ _ => None,
58
+ }
59
60
+}
61
62
impl From<der::Error> for Error {
63
fn from(err: der::Error) -> Error {
0 commit comments