diff options
Diffstat (limited to 'openpgp/src/crypto/backend/openssl.rs')
-rw-r--r-- | openpgp/src/crypto/backend/openssl.rs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/openpgp/src/crypto/backend/openssl.rs b/openpgp/src/crypto/backend/openssl.rs index 70d20de4..96679e2d 100644 --- a/openpgp/src/crypto/backend/openssl.rs +++ b/openpgp/src/crypto/backend/openssl.rs @@ -1,5 +1,4 @@ //! Implementation of Sequoia crypto API using the OpenSSL cryptographic library. -use std::convert::TryFrom; use crate::types::*; @@ -22,38 +21,6 @@ impl super::interface::Backend for Backend { } } -impl PublicKeyAlgorithm { - pub(crate) fn is_supported_by_backend(&self) -> bool { - use PublicKeyAlgorithm::*; - #[allow(deprecated)] - match self { - RSAEncryptSign | RSAEncrypt | RSASign => true, - DSA => true, - ECDH | ECDSA | EdDSA => true, - ElGamalEncrypt | ElGamalEncryptSign | - Private(_) | Unknown(_) - => false, - } - } -} - -impl Curve { - pub(crate) fn is_supported_by_backend(&self) -> bool { - if matches!(self, Curve::Ed25519 | Curve::Cv25519) { - // 25519-based algorithms are special-cased and supported - true - } else { - // the rest of EC algorithms are supported via the same - // codepath - if let Ok(nid) = openssl::nid::Nid::try_from(self) { - openssl::ec::EcGroup::from_curve_name(nid).is_ok() - } else { - false - } - } - } -} - impl AEADAlgorithm { /// Returns the best AEAD mode supported by the backend. /// |