diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-05-21 12:06:12 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-05-21 13:45:58 +0200 |
commit | 3863140b0d71eff1ff2240fcd0c7fb769b17a971 (patch) | |
tree | 92d6664d2ec2f3a6b73b843ae0ac431b6fc83eec /openpgp-ffi/src/error.rs | |
parent | 9e6d056dab32abd1f8381a701e1cd00d4fb8c660 (diff) |
openpgp: New error for unsupported compression algorithms.
Diffstat (limited to 'openpgp-ffi/src/error.rs')
-rw-r--r-- | openpgp-ffi/src/error.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openpgp-ffi/src/error.rs b/openpgp-ffi/src/error.rs index 66dd7417..bf4aeb2b 100644 --- a/openpgp-ffi/src/error.rs +++ b/openpgp-ffi/src/error.rs @@ -93,6 +93,9 @@ pub enum Status { /// Unsupported AEAD algorithm. UnsupportedAEADAlgorithm = -26, + /// Unsupported Compression algorithm. + UnsupportedCompressionAlgorithm = -28, + /// Unsupport signature type. UnsupportedSignatureType = -20, @@ -139,6 +142,7 @@ pub enum Status { // XXX: Skipping ManipulatedMessage = -25 // XXX: Skipping UnsupportedAEADAlgorithm = -26 // XXX: Skipping MissingSessionKey = -27 + // XXX: Skipping UnsupportedCompressionAlgorithm = -28 } /// Returns the error message. @@ -165,6 +169,8 @@ pub extern "C" fn pgp_status_to_string(status: Status) -> *const c_char { UnsupportedSymmetricAlgorithm => "Unsupported symmetric algorithm\x00", UnsupportedAEADAlgorithm => "Unsupported AEAD algorithm\x00", + UnsupportedCompressionAlgorithm => + "Unsupported compression algorithm\x00", UnsupportedSignatureType => "Unsupport signature type\x00", InvalidPassword => "Invalid password\x00", InvalidSessionKey => "Invalid session key\x00", @@ -201,6 +207,8 @@ impl<'a> From<&'a failure::Error> for Status { Status::UnsupportedSymmetricAlgorithm, &openpgp::Error::UnsupportedAEADAlgorithm(_) => Status::UnsupportedAEADAlgorithm, + &openpgp::Error::UnsupportedCompressionAlgorithm(_) => + Status::UnsupportedCompressionAlgorithm, &openpgp::Error::UnsupportedSignatureType(_) => Status::UnsupportedSignatureType, &openpgp::Error::InvalidPassword => |