mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +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:
parent
ed5c1b0b8a
commit
9e6503b7ce
4 changed files with 11 additions and 53 deletions
|
@ -111,10 +111,6 @@ my_strusage (int level)
|
|||
|
||||
|
||||
|
||||
/* Include the implementation of map_spwq_error. */
|
||||
MAP_SPWQ_ERROR_IMPL
|
||||
|
||||
|
||||
static void
|
||||
preset_passphrase (const char *keygrip)
|
||||
{
|
||||
|
@ -170,7 +166,7 @@ preset_passphrase (const char *keygrip)
|
|||
if (!opt_passphrase)
|
||||
wipememory (passphrase, sizeof (passphrase));
|
||||
|
||||
rc = map_spwq_error (simple_query (line));
|
||||
rc = simple_query (line);
|
||||
if (rc)
|
||||
{
|
||||
log_error ("caching passphrase failed: %s\n", gpg_strerror (rc));
|
||||
|
@ -192,7 +188,7 @@ forget_passphrase (const char *keygrip)
|
|||
if (rc < 0)
|
||||
rc = gpg_error_from_syserror ();
|
||||
else
|
||||
rc = map_spwq_error (simple_query (line));
|
||||
rc = simple_query (line);
|
||||
if (rc)
|
||||
{
|
||||
log_error ("clearing passphrase failed: %s\n", gpg_strerror (rc));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue