Commit
+1 -17 +/-1 browse
1 | diff --git a/src/common/crypto.rs b/src/common/crypto.rs |
2 | index 0852061..ea6aa3d 100644 |
3 | --- a/src/common/crypto.rs |
4 | +++ b/src/common/crypto.rs |
5 | @@ -1,11 +1,7 @@ |
6 | use std::marker::PhantomData; |
7 | |
8 | use ed25519_dalek::Signer; |
9 | - use rsa::{ |
10 | - pkcs1::DecodeRsaPrivateKey, |
11 | - pkcs8::{AssociatedOid, ObjectIdentifier}, |
12 | - PaddingScheme, PublicKey as _, RsaPrivateKey, |
13 | - }; |
14 | + use rsa::{pkcs1::DecodeRsaPrivateKey, PaddingScheme, PublicKey as _, RsaPrivateKey}; |
15 | use sha1::digest::Output; |
16 | use sha2::digest::Digest; |
17 | |
18 | @@ -307,18 +303,6 @@ impl AsRef<[u8]> for HashOutput { |
19 | } |
20 | } |
21 | |
22 | - impl TryFrom<&ObjectIdentifier> for HashAlgorithm { |
23 | - type Error = Error; |
24 | - |
25 | - fn try_from(oid: &ObjectIdentifier) -> Result<Self> { |
26 | - match oid { |
27 | - oid if oid == &sha2::Sha256::OID => Ok(HashAlgorithm::Sha256), |
28 | - oid if oid == &sha1::Sha1::OID => Ok(HashAlgorithm::Sha1), |
29 | - _ => Err(Error::CryptoError("Unsupported hash algorithm".to_string())), |
30 | - } |
31 | - } |
32 | - } |
33 | - |
34 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] |
35 | pub enum Algorithm { |
36 | RsaSha1, |