diff options
Diffstat (limited to 'openpgp-ffi/src/error.rs')
-rw-r--r-- | openpgp-ffi/src/error.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openpgp-ffi/src/error.rs b/openpgp-ffi/src/error.rs index 43b2b63d..b26610a5 100644 --- a/openpgp-ffi/src/error.rs +++ b/openpgp-ffi/src/error.rs @@ -156,6 +156,9 @@ pub enum Status { /// No binding signature. NoBindingSignature = -32, + + /// Invalid key. + InvalidKey = -33, } /// Returns the error message. @@ -199,6 +202,7 @@ pub extern "C" fn pgp_status_to_string(status: Status) -> *const c_char { Expired => "Expired\x00", NotYetLive => "Not yet live\x00", NoBindingSignature => "No binding signature\x00", + InvalidKey => "Invalid key\x00", }.as_bytes().as_ptr() as *const c_char } @@ -256,6 +260,8 @@ impl<'a> From<&'a failure::Error> for Status { Status::NotYetLive, &openpgp::Error::NoBindingSignature(_) => Status::NoBindingSignature, + &openpgp::Error::InvalidKey(_) => + Status::InvalidKey, openpgp::Error::__Nonexhaustive => unreachable!(), } } |