summaryrefslogtreecommitdiff
path: root/lib/x509/privkey_pkcs8.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-12-13 11:27:38 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-12-13 11:48:28 +0100
commite62aaf4bfaf1a4280db23d9729c2d7fa0fdf97e5 (patch)
tree7f319440cf35e66b32950095db6615bd9b55dd22 /lib/x509/privkey_pkcs8.c
parentfac99985e8ab28d4c12ca70469e3e74037befdfd (diff)
downloadgnutls-e62aaf4bfaf1a4280db23d9729c2d7fa0fdf97e5.tar.gz
pkcs8: ensure that the correct error code is returned on decryption failure
Diffstat (limited to 'lib/x509/privkey_pkcs8.c')
-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 74bb466c65..0094a83a5f 100644
--- a/lib/x509/privkey_pkcs8.c
+++ b/lib/x509/privkey_pkcs8.c
@@ -711,6 +711,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;
}