From a73773886eaf45116a3109e8b740854aeead6d08 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 16 Mar 2011 19:41:52 +0100 Subject: introduced GNUTLS_E_OPENPGP_PREFERRED_KEY_ERROR --- lib/openpgp/privkey.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/openpgp/privkey.c') diff --git a/lib/openpgp/privkey.c b/lib/openpgp/privkey.c index 07bb9880c5..0ed4f0d7cf 100644 --- a/lib/openpgp/privkey.c +++ b/lib/openpgp/privkey.c @@ -1176,7 +1176,10 @@ int gnutls_openpgp_privkey_get_preferred_key_id (gnutls_openpgp_privkey_t key, gnutls_openpgp_keyid_t keyid) { - if (!key || !keyid || !key->preferred_set) + if (!key->preferred_set) + return gnutls_assert_val(GNUTLS_E_OPENPGP_PREFERRED_KEY_ERROR); + + if (!key || !keyid) { gnutls_assert (); return GNUTLS_E_INVALID_REQUEST; -- cgit v1.2.1