diff options
Diffstat (limited to 'src/passphrase.c')
-rw-r--r-- | src/passphrase.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/passphrase.c b/src/passphrase.c index c36b6ae..00e9d99 100644 --- a/src/passphrase.c +++ b/src/passphrase.c @@ -1,19 +1,19 @@ /* passphrase.c - Passphrase callback. Copyright (C) 2000 Werner Koch (dd9jn) Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH - + This file is part of GPGME. - + GPGME is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + GPGME is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA @@ -32,6 +32,7 @@ #include "context.h" #include "ops.h" #include "util.h" +#include "debug.h" typedef struct @@ -76,7 +77,7 @@ _gpgme_passphrase_status_handler (void *priv, gpgme_status_code_t code, if (opd->uid_hint) free (opd->uid_hint); if (!(opd->uid_hint = strdup (args))) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); break; case GPGME_STATUS_BAD_PASSPHRASE: @@ -96,7 +97,7 @@ _gpgme_passphrase_status_handler (void *priv, gpgme_status_code_t code, free (opd->passphrase_info); opd->passphrase_info = strdup (args); if (!opd->passphrase_info) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); break; case GPGME_STATUS_MISSING_PASSPHRASE: @@ -133,7 +134,7 @@ _gpgme_passphrase_command_handler (void *priv, gpgme_status_code_t code, if (err) return err; - if (code == GPGME_STATUS_GET_HIDDEN + if (code == GPGME_STATUS_GET_HIDDEN && (!strcmp (key, "passphrase.enter") || !strcmp (key, "passphrase.pin.ask"))) { |