diff options
author | Marcus Brinkmann <[email protected]> | 2010-05-06 13:39:55 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2010-05-06 13:39:55 +0000 |
commit | 749325d6c10fd6a8d8fafa3c9c25b6822eaf0dc5 (patch) | |
tree | 5e43ee1064a9e68208c7ab288e08e89c814caa5f /src/verify.c | |
parent | 2010-04-19 Marcus Brinkmann <[email protected]> (diff) | |
download | gpgme-749325d6c10fd6a8d8fafa3c9c25b6822eaf0dc5.tar.gz gpgme-749325d6c10fd6a8d8fafa3c9c25b6822eaf0dc5.zip |
2010-05-06 Marcus Brinkmann <[email protected]>
* configure.ac: Require libgpg-error 1.8.
src/
2010-05-06 Marcus Brinkmann <[email protected]>
* sign.c, data-user.c, conversion.c, debug.c, verify.c, data.c,
decrypt.c, delete.c, assuan-support.c, import.c, engine-gpgsm.c,
data-mem.c, op-support.c, w32-io.c, w32-util.c, data-compat.c: Use
gpg_error_from_syserror instead gpg_error_from_errno, and use
gpg_err_set_errno to set error number.
* setenv.c: Include <gpg-error.h> and define __set_errno to use
gpg_err_set_errno.
* gpgme-tool.c (ARGP_ERR_UNKNOWN): Define to EDEADLOCK (which is
mapped in Windows CE) instead of E2BIG (which is not).
(gt_import_keys): Initialize err.
Diffstat (limited to 'src/verify.c')
-rw-r--r-- | src/verify.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/verify.c b/src/verify.c index ab74ec29..ed81b8ac 100644 --- a/src/verify.c +++ b/src/verify.c @@ -227,7 +227,7 @@ prepare_new_sig (op_data_t opd) { sig = calloc (1, sizeof (*sig)); if (!sig) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); if (!opd->result.signatures) opd->result.signatures = sig; if (opd->current_sig) @@ -293,7 +293,7 @@ parse_new_sig (op_data_t opd, gpgme_status_code_t code, char *args) /* Parse the pubkey algo. */ if (!end) goto parse_err_sig_fail; - errno = 0; + gpg_err_set_errno (0); sig->pubkey_algo = strtol (end, &tail, 0); if (errno || end == tail || *tail != ' ') goto parse_err_sig_fail; @@ -304,7 +304,7 @@ parse_new_sig (op_data_t opd, gpgme_status_code_t code, char *args) /* Parse the hash algo. */ if (!*end) goto parse_err_sig_fail; - errno = 0; + gpg_err_set_errno (0); sig->hash_algo = strtol (end, &tail, 0); if (errno || end == tail || *tail != ' ') goto parse_err_sig_fail; @@ -362,7 +362,7 @@ parse_new_sig (op_data_t opd, gpgme_status_code_t code, char *args) { sig->fpr = strdup (args); if (!sig->fpr) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); } return 0; } @@ -386,7 +386,7 @@ parse_valid_sig (gpgme_signature_t sig, char *args) free (sig->fpr); sig->fpr = strdup (args); if (!sig->fpr) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); /* Skip the creation date. */ end = strchr (end, ' '); @@ -418,7 +418,7 @@ parse_valid_sig (gpgme_signature_t sig, char *args) if (end) { /* Parse the pubkey algo. */ - errno = 0; + gpg_err_set_errno (0); sig->pubkey_algo = strtol (end, &tail, 0); if (errno || end == tail || *tail != ' ') return gpg_error (GPG_ERR_INV_ENGINE); @@ -431,7 +431,7 @@ parse_valid_sig (gpgme_signature_t sig, char *args) { /* Parse the hash algo. */ - errno = 0; + gpg_err_set_errno (0); sig->hash_algo = strtol (end, &tail, 0); if (errno || end == tail || *tail != ' ') return gpg_error (GPG_ERR_INV_ENGINE); @@ -526,14 +526,14 @@ parse_notation (gpgme_signature_t sig, gpgme_status_code_t code, char *args) { dest = notation->value = malloc (len); if (!dest) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); } else { int cur_len = strlen (notation->value); dest = realloc (notation->value, len + strlen (notation->value)); if (!dest) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); notation->value = dest; dest += cur_len; } |