From cb2cbf10386bd8c5418eeda06b0f5ff15aa7bac5 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Wed, 4 Jun 2003 02:07:59 +0000 Subject: 2003-06-04 Marcus Brinkmann * src/gpg-error.h (gpg_err_code_t): Add GPG_ERR_INV_ENGINE, GPG_ERR_PUBKEY_NOT_TRUSTED, GPG_ERR_DECRYPT_FAILED, GPG_ERR_KEY_EXPIRED. (gpg_make_error): Rename to gpg_err_make. (gpg_error): Use here. * tests/t-strerror.c (main): And here. (gpg_make_error_from_errno): Rename to gpg_err_make_from_errno. --- src/err-codes.h.in | 4 ++++ src/gpg-error.h | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/err-codes.h.in b/src/err-codes.h.in index 6b67dbe..1243828 100644 --- a/src/err-codes.h.in +++ b/src/err-codes.h.in @@ -140,6 +140,10 @@ 123 Card not initialized 124 Unsupported operation 125 Wrong key usage +150 Invalid crypto engine +151 Public key not trusted +152 Decryption failed +153 Key expired 201 Invalid length specifier in S-expression 202 String too long in S-expression 203 Unmatched parentheses in S-expression diff --git a/src/gpg-error.h b/src/gpg-error.h index e69399a..2d126c8 100644 --- a/src/gpg-error.h +++ b/src/gpg-error.h @@ -203,6 +203,11 @@ typedef enum GPG_ERR_UNSUPPORTED_OPERATION = 124, GPG_ERR_WRONG_KEY_USAGE = 125, + GPG_ERR_INV_ENGINE = 150, + GPG_ERR_PUBKEY_NOT_TRUSTED = 151, + GPG_ERR_DECRYPT_FAILED = 152, + GPG_ERR_KEY_EXPIRED = 153, + /* Error codes pertaining to S-expressions. */ GPG_ERR_SEXP_INV_LEN_SPEC = 201, GPG_ERR_SEXP_STRING_TOO_LONG = 202, @@ -412,7 +417,7 @@ typedef unsigned int gpg_error_t; /* Construct an error value from an error code and source. Within a subsystem, use gpg_error. */ static __inline__ gpg_error_t -gpg_make_error (gpg_err_source_t source, gpg_err_code_t code) +gpg_err_make (gpg_err_source_t source, gpg_err_code_t code) { return code == GPG_ERR_NO_ERROR ? GPG_ERR_NO_ERROR : (((source & GPG_ERR_SOURCE_MASK) << GPG_ERR_SOURCE_SHIFT) @@ -429,7 +434,7 @@ gpg_make_error (gpg_err_source_t source, gpg_err_code_t code) static __inline__ gpg_error_t gpg_error (gpg_err_code_t code) { - return gpg_make_error (GPG_ERR_SOURCE_DEFAULT, code); + return gpg_err_make (GPG_ERR_SOURCE_DEFAULT, code); } @@ -475,7 +480,7 @@ int gpg_err_code_to_errno (gpg_err_code_t code); /* Self-documenting convenience functions. */ static __inline__ gpg_error_t -gpg_make_error_from_errno (gpg_err_source_t source, int err) +gpg_err_make_from_errno (gpg_err_source_t source, int err) { return gpg_make_error (source, gpg_err_code_from_errno (err)); } -- cgit v1.2.3