summaryrefslogtreecommitdiffstats
path: root/openpgp/src/types/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/types/mod.rs')
-rw-r--r--openpgp/src/types/mod.rs25
1 files changed, 3 insertions, 22 deletions
diff --git a/openpgp/src/types/mod.rs b/openpgp/src/types/mod.rs
index 750ef2ca..09b79f9d 100644
--- a/openpgp/src/types/mod.rs
+++ b/openpgp/src/types/mod.rs
@@ -195,14 +195,7 @@ impl PublicKeyAlgorithm {
/// assert!(!PublicKeyAlgorithm::Private(101).is_supported());
/// ```
pub fn is_supported(&self) -> bool {
- use self::PublicKeyAlgorithm::*;
- #[allow(deprecated)]
- match &self {
- RSAEncryptSign | RSAEncrypt | RSASign | DSA | ECDH | ECDSA | EdDSA
- => true,
- ElGamalEncrypt | ElGamalEncryptSign | Private(_) | Unknown(_)
- => false,
- }
+ self.is_supported_by_backend()
}
}
@@ -491,13 +484,7 @@ impl Curve {
/// assert!(!Curve::Unknown(Box::new([0x2B, 0x11])).is_supported());
/// ```
pub fn is_supported(&self) -> bool {
- use self::Curve::*;
- match &self {
- NistP256 | NistP384 | NistP521 | Ed25519 | Cv25519
- => true,
- BrainpoolP256 | BrainpoolP512 | Unknown(_)
- => false,
- }
+ self.is_supported_by_backend()
}
}
@@ -738,13 +725,7 @@ impl AEADAlgorithm {
/// assert!(!AEADAlgorithm::OCB.is_supported());
/// ```
pub fn is_supported(&self) -> bool {
- use self::AEADAlgorithm::*;
- match &self {
- EAX
- => true,
- OCB | Private(_) | Unknown(_)
- => false,
- }
+ self.is_supported_by_backend()
}
}