From: Nikos Mavrogiannopoulos Date: Tue, 13 Dec 2016 10:27:38 +0000 (+0100) Subject: pkcs8: ensure that the correct error code is returned on decryption failure X-Git-Tag: gnutls_3_5_8~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e62aaf4bfaf1a4280db23d9729c2d7fa0fdf97e5;p=thirdparty%2Fgnutls.git pkcs8: ensure that the correct error code is returned on decryption failure --- 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; }