Copyright (C) 2001, 2002, 2003, 2004, 2007 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
default:
/* The backend engine is not behaving. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
args++;
if (*args != ' ')
{
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
gpg_err_set_errno (0);
{
/* The crypto backend does not behave. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
args = tail;
{
/* The crypto backend does not behave. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
args = tail;
{
/* The crypto backend does not behave. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
args = tail;
{
/* The crypto backend does not behave. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
args = tail;
while (*args == ' ')
{
/* The crypto backend does not behave. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
tail = strchr (args, ' ');
case GPGME_STATUS_INV_RECP:
if (opd->inv_sgnr_seen && opd->ignore_inv_recp)
- break;
+ break;
/* FALLTROUGH */
case GPGME_STATUS_INV_SGNR:
if (code == GPGME_STATUS_INV_SGNR)
gpg_error_t err;
TRACE_BEG3 (DEBUG_CTX, "gpgme_op_sign_start", ctx,
"plain=%p, sig=%p, mode=%i", plain, sig, mode);
+
+ if (!ctx)
+ return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));
+
err = sign_start (ctx, 0, plain, sig, mode);
return TRACE_ERR (err);
}
TRACE_BEG3 (DEBUG_CTX, "gpgme_op_sign", ctx,
"plain=%p, sig=%p, mode=%i", plain, sig, mode);
+
+ if (!ctx)
+ return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));
+
err = sign_start (ctx, 1, plain, sig, mode);
if (!err)
err = _gpgme_wait_one (ctx);