1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

common: Remove simple password query error codes.

* common/simple-pwquery.h: Remove mapping function.  Move all
definitions of status codes...
* common/simple-pwquery.c: ... here, and define them to meaningful gpg
error values.
* agent/preset-passphrase.c (preset_passphrase): Use error code as-is.
(forget_passphrase): Likewise.
* tools/symcryptrun.c (confucius_get_pass): Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-08-11 09:52:08 +02:00
parent ed5c1b0b8a
commit 9e6503b7ce
4 changed files with 11 additions and 53 deletions

View file

@ -50,6 +50,15 @@
#define SIMPLE_PWQUERY_IMPLEMENTATION 1
#include "simple-pwquery.h"
#define SPWQ_OUT_OF_CORE gpg_error_from_errno (ENOMEM)
#define SPWQ_IO_ERROR gpg_error_from_errno (EIO)
#define SPWQ_PROTOCOL_ERROR gpg_error (GPG_ERR_PROTOCOL_VIOLATION)
#define SPWQ_ERR_RESPONSE gpg_error (GPG_ERR_INV_RESPONSE)
#define SPWQ_NO_AGENT gpg_error (GPG_ERR_NO_AGENT)
#define SPWQ_SYS_ERROR gpg_error_from_syserror ()
#define SPWQ_GENERAL_ERROR gpg_error (GPG_ERR_GENERAL)
#define SPWQ_NO_PIN_ENTRY gpg_error (GPG_ERR_NO_PIN_ENTRY)
#ifndef _
#define _(a) (a)
#endif