summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-12-13 11:27:38 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-12-14 10:48:03 +0100
commita28d20ee96a2c0bfc52b19eb22d2908c0ebf167c (patch)
tree1b493126ec193260edd00850a1237059e8af8d24
parent66fa251547b63f4b9b277588e2afec070c0ba096 (diff)
downloadgnutls-a28d20ee96a2c0bfc52b19eb22d2908c0ebf167c.tar.gz
pkcs8: ensure that the correct error code is returned on decryption failure
-rw-r--r--lib/x509/privkey_pkcs8.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c
index 2880c146dd..c06cb47be9 100644
--- a/lib/x509/privkey_pkcs8.c
+++ b/lib/x509/privkey_pkcs8.c
@@ -1034,6 +1034,7 @@ static int pkcs8_key_decrypt(const gnutls_datum_t * raw_key,
&kdf_params, &enc_params, &tmp);
if (result < 0) {
gnutls_assert();
+ result = GNUTLS_E_DECRYPTION_FAILED;
goto error;
}