summaryrefslogtreecommitdiff
path: root/lib/nettle
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-07-27 07:19:36 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-04 09:38:27 +0200
commit95b19575d2e118b64606bc0a3ef265424a9a863f (patch)
treebe359204457c0359833afc6a403066372ba005d5 /lib/nettle
parent41ef006dddad5c09a8a645ae8713631f02b799e5 (diff)
downloadgnutls-95b19575d2e118b64606bc0a3ef265424a9a863f.tar.gz
_wrap_nettle_pk_encrypt: return GNUTLS_E_INVALID_REQUEST on unsupported algorithms
That is a more specific error code than internal error. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/nettle')
-rw-r--r--lib/nettle/pk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/nettle/pk.c b/lib/nettle/pk.c
index 568b9553f4..217025cd7b 100644
--- a/lib/nettle/pk.c
+++ b/lib/nettle/pk.c
@@ -395,7 +395,7 @@ _wrap_nettle_pk_encrypt(gnutls_pk_algorithm_t algo,
}
default:
gnutls_assert();
- ret = GNUTLS_E_INTERNAL_ERROR;
+ ret = GNUTLS_E_INVALID_REQUEST;
goto cleanup;
}
@@ -828,7 +828,7 @@ _rsa_pss_verify_digest(gnutls_digest_algorithm_t dig,
}
if (digest_size != hash_size)
- return 0;
+ return gnutls_assert_val(0);
return verify_func(pub, salt_size, digest, s);
}