diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-10-09 17:48:17 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-10-09 17:50:57 +0200 |
commit | 541c3447f364d3daa660c7289b00d8580624e2ad (patch) | |
tree | d208b3ae1df11c2d93fb3a30c6e1155fb866fdac /ffi | |
parent | eb8bd2d85776d35392ee5e7f5d08967119a00899 (diff) |
openpgp: Add error for unsupported AEAD algorithms.
Diffstat (limited to 'ffi')
-rw-r--r-- | ffi/include/sequoia/error.h | 5 | ||||
-rw-r--r-- | ffi/src/error.rs | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ffi/include/sequoia/error.h b/ffi/include/sequoia/error.h index 661f36fd..d7a1e680 100644 --- a/ffi/include/sequoia/error.h +++ b/ffi/include/sequoia/error.h @@ -83,6 +83,11 @@ typedef enum sq_status { SQ_STATUS_UNSUPPORTED_SYMMETRIC_ALGORITHM = -10, /*/ + /// Unsupported AEAD algorithm. + /*/ + SQ_STATUS_UNSUPPORTED_AEAD_ALGORITHM = -26, + + /*/ /// Unsupport signature type. /*/ SQ_STATUS_UNSUPPORTED_SIGNATURE_TYPE = -20, diff --git a/ffi/src/error.rs b/ffi/src/error.rs index b5f39c8f..f9593eba 100644 --- a/ffi/src/error.rs +++ b/ffi/src/error.rs @@ -85,6 +85,9 @@ pub enum Status { /// Unsupported symmetric algorithm. UnsupportedSymmetricAlgorithm = -10, + /// Unsupported AEAD algorithm. + UnsupportedAEADAlgorithm = -26, + /// Unsupport signature type. UnsupportedSignatureType = -20, @@ -126,6 +129,7 @@ pub enum Status { UnsupportedTPK = -24, // XXX: Skipping ManipulatedMessage = -25 + // XXX: Skipping UnsupportedAEADAlgorithm = -26 } impl<'a> From<&'a failure::Error> for Status { @@ -163,6 +167,8 @@ impl<'a> From<&'a failure::Error> for Status { Status::UnsupportedEllipticCurve, &openpgp::Error::UnsupportedSymmetricAlgorithm(_) => Status::UnsupportedSymmetricAlgorithm, + &openpgp::Error::UnsupportedAEADAlgorithm(_) => + Status::UnsupportedAEADAlgorithm, &openpgp::Error::UnsupportedSignatureType(_) => Status::UnsupportedSignatureType, &openpgp::Error::InvalidPassword => |