diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-09 11:57:22 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-09 12:10:40 +0100 |
commit | 7f3d55f777f44f9046ac91afe8e398984f1e4ba1 (patch) | |
tree | 4c3edeae026a56d8fadeb5c6ea327a2d13185c74 /openpgp-ffi/src | |
parent | d4e3162c0c56a874f29a58d7fe84a8723b9516aa (diff) |
openpgp: New errors Expired and NotYetLive.
Diffstat (limited to 'openpgp-ffi/src')
-rw-r--r-- | openpgp-ffi/src/error.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/openpgp-ffi/src/error.rs b/openpgp-ffi/src/error.rs index 4c2924c3..14c79187 100644 --- a/openpgp-ffi/src/error.rs +++ b/openpgp-ffi/src/error.rs @@ -147,6 +147,12 @@ pub enum Status { // XXX: Skipping MissingSessionKey = -27 // XXX: Skipping UnsupportedCompressionAlgorithm = -28 // XXX: Skipping PacketTooLarge = -29 + + /// Expired. + Expired = -30, + + /// Not yet live. + NotYetLive = -31, } /// Returns the error message. @@ -187,6 +193,8 @@ pub extern "C" fn pgp_status_to_string(status: Status) -> *const c_char { MalformedMessage => "Malformed message\x00", IndexOutOfRange => "Index out of range\x00", UnsupportedCert => "Cert not supported\x00", + Expired => "Expired\x00", + NotYetLive => "Not yet live\x00", }.as_bytes().as_ptr() as *const c_char } @@ -238,6 +246,10 @@ impl<'a> From<&'a failure::Error> for Status { Status::IndexOutOfRange, &openpgp::Error::UnsupportedCert(_) => Status::UnsupportedCert, + &openpgp::Error::Expired(_) => + Status::Expired, + &openpgp::Error::NotYetLive(_) => + Status::NotYetLive, } } |