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 11:14:28 +0100
commit9aa2fbe6a6782d0627eea234c6375421c1547e8f (patch)
tree075f1302b18fd37a03ab5ed8a0af8f68e514e3b1
parentafa69cb27640ac98cc40eea95dab42bf6f80242a (diff)
downloadgnutls-9aa2fbe6a6782d0627eea234c6375421c1547e8f.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 ca638f6ebc..7f0b886cf9 100644
--- a/lib/x509/privkey_pkcs8.c
+++ b/lib/x509/privkey_pkcs8.c
@@ -881,6 +881,7 @@ static int decrypt_pkcs8_key(const gnutls_datum_t * raw_key,
&kdf_params, &enc_params, &tmp);
if (result < 0) {
gnutls_assert();
+ result = GNUTLS_E_DECRYPTION_FAILED;
goto error;
}