diff options
author | Werner Koch <wk@gnupg.org> | 2002-05-21 10:29:17 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2002-05-21 10:29:17 +0200 |
commit | 4f7330e0bb76b5c9c0d6a0fe4eab4b933f1a2c36 (patch) | |
tree | 4723204f29fe378c3342e65fe165c1f55846e26b /common | |
parent | sm/ (diff) | |
download | gnupg2-4f7330e0bb76b5c9c0d6a0fe4eab4b933f1a2c36.tar.xz gnupg2-4f7330e0bb76b5c9c0d6a0fe4eab4b933f1a2c36.zip |
* import.c (gpgsm_import): Try to identify the type of input and
handle certs-only messages.
* maperror.c (map_gcry_err): Add libgcrypt's new S-expression errors.
(map_ksba_err): Add a few mappings.
* configure.ac: We now require libgcrypt 1.1.7 and libksba 0.4.2.
Diffstat (limited to 'common')
-rw-r--r-- | common/ChangeLog | 5 | ||||
-rw-r--r-- | common/maperror.c | 30 |
2 files changed, 33 insertions, 2 deletions
diff --git a/common/ChangeLog b/common/ChangeLog index 1e9c9d179..bf81cf873 100644 --- a/common/ChangeLog +++ b/common/ChangeLog @@ -1,3 +1,8 @@ +2002-05-21 Werner Koch <wk@gnupg.org> + + * maperror.c (map_gcry_err): Add libgcrypt's new S-expression errors. + (map_ksba_err): Add a few mappings. + 2002-05-14 Werner Koch <wk@gnupg.org> * gettime.c: New. diff --git a/common/maperror.c b/common/maperror.c index 30bdf07a5..8b79f51a5 100644 --- a/common/maperror.c +++ b/common/maperror.c @@ -33,18 +33,28 @@ #include "../assuan/assuan.h" /* Note: we might want to wrap this in a macro to get our hands on - the line and file where the error occired */ + the line and file where the error occured */ int map_ksba_err (int err) { switch (err) { case -1: - case 0: + case 0: break; + case KSBA_Out_Of_Core: err = GNUPG_Out_Of_Core; break; + case KSBA_Invalid_Value: err = GNUPG_Invalid_Value; break; + case KSBA_Not_Implemented: err = GNUPG_Not_Implemented; break; + case KSBA_Conflict: err = GNUPG_Conflict; break; + case KSBA_Read_Error: err = GNUPG_Read_Error; break; + case KSBA_Write_Error: err = GNUPG_Write_Error; break; + case KSBA_No_Data: err = GNUPG_No_Data; break; + case KSBA_Bug: err = GNUPG_Bug; break; case KSBA_Unsupported_Algorithm: err = GNUPG_Unsupported_Algorithm; break; case KSBA_Invalid_Index: err = GNUPG_Invalid_Index; break; + case KSBA_Invalid_Sexp: err = GNUPG_Invalid_Sexp; break; + case KSBA_Unknown_Sexp: err = GNUPG_Unknown_Sexp; break; default: err = seterr (General_Error); @@ -94,6 +104,22 @@ map_gcry_err (int err) err = GNUPG_Bug; break; + case GCRYERR_SEXP_INV_LEN_SPEC : + case GCRYERR_SEXP_STRING_TOO_LONG : + case GCRYERR_SEXP_UNMATCHED_PAREN : + case GCRYERR_SEXP_NOT_CANONICAL : + case GCRYERR_SEXP_BAD_CHARACTER : + case GCRYERR_SEXP_BAD_QUOTATION : + case GCRYERR_SEXP_ZERO_PREFIX : + case GCRYERR_SEXP_NESTED_DH : + case GCRYERR_SEXP_UNMATCHED_DH : + case GCRYERR_SEXP_UNEXPECTED_PUNC : + case GCRYERR_SEXP_BAD_HEX_CHAR : + case GCRYERR_SEXP_ODD_HEX_NUMBERS : + case GCRYERR_SEXP_BAD_OCT_CHAR : + err = GNUPG_Invalid_Sexp; + break; + case GCRYERR_NO_MEM: err = GNUPG_Out_Of_Core; break; case GCRYERR_NOT_IMPL: err = GNUPG_Not_Implemented; break; |