summaryrefslogtreecommitdiff
path: root/lib/openpgp
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-12-18 12:00:01 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-12-18 12:00:01 +0100
commit32aabbb05e25e7eb3cf306590ff30be8d7e30da5 (patch)
tree43ae83e80be2ef5867b7bb687a04c94ac2d4287f /lib/openpgp
parentdc6c1be344ff3641b8e5c1e301a466427bd02b49 (diff)
downloadgnutls-32aabbb05e25e7eb3cf306590ff30be8d7e30da5.tar.gz
The verification functions now return a GNUTLS_E_PK_SIG_VERIFY_FAILED on signature verification error.
Diffstat (limited to 'lib/openpgp')
-rw-r--r--lib/openpgp/pgp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/openpgp/pgp.c b/lib/openpgp/pgp.c
index 4dc8af4cf3..409711c252 100644
--- a/lib/openpgp/pgp.c
+++ b/lib/openpgp/pgp.c
@@ -1698,8 +1698,8 @@ gnutls_openpgp_crt_get_auth_subkey (gnutls_openpgp_crt_t crt,
* This function will verify the given signed digest, using the
* parameters from the certificate.
*
- * Returns: In case of a verification failure 0 is returned, and 1 on
- * success.
+ * Returns: In case of a verification failure %GNUTLS_E_PK_SIG_VERIFY_FAILED
+ * is returned, and a positive code on success.
**/
int
gnutls_openpgp_crt_verify_hash (gnutls_openpgp_crt_t crt, unsigned int flags,
@@ -1738,7 +1738,7 @@ gnutls_openpgp_crt_verify_hash (gnutls_openpgp_crt_t crt, unsigned int flags,
if (ret < 0)
{
gnutls_assert ();
- return 0;
+ return ret;
}
return ret;