]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
pkcs8: ensure that the correct error code is returned on decryption failure
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 13 Dec 2016 10:27:38 +0000 (11:27 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 13 Dec 2016 10:48:28 +0000 (11:48 +0100)
lib/x509/privkey_pkcs8.c

index 74bb466c65fbd097499ee9ce5836e5f7d93b1cbf..0094a83a5fcdec59b89e009866ff842e31cb744b 100644 (file)
@@ -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;
        }