diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-12-14 10:59:01 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-12-14 11:15:00 +0100 |
commit | 7bc0dc16851fa46753ffc63b065e4abaaca6cb39 (patch) | |
tree | 483f921ab53637f00dbb4abbfa82a42bef2f6ecc | |
parent | 9aa2fbe6a6782d0627eea234c6375421c1547e8f (diff) | |
download | gnutls-7bc0dc16851fa46753ffc63b065e4abaaca6cb39.tar.gz |
PKCS#7 decrypt_data: merge all errors during decryption to GNUTLS_E_DECRYPTION_FAILED
-rw-r--r-- | lib/x509/privkey_pkcs8.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c index 7f0b886cf9..4d4772f737 100644 --- a/lib/x509/privkey_pkcs8.c +++ b/lib/x509/privkey_pkcs8.c @@ -1698,7 +1698,7 @@ decrypt_data(schema_id schema, ASN1_TYPE pkcs8_asn, if (ce->block && (data_size % block_size != 0)) { gnutls_assert(); - result = GNUTLS_E_ILLEGAL_PARAMETER; + result = GNUTLS_E_DECRYPTION_FAILED; goto error; } @@ -1717,6 +1717,7 @@ decrypt_data(schema_id schema, ASN1_TYPE pkcs8_asn, if (result < 0) { gnutls_assert(); + result = GNUTLS_E_DECRYPTION_FAILED; goto error; } @@ -1733,7 +1734,7 @@ decrypt_data(schema_id schema, ASN1_TYPE pkcs8_asn, if (block_size != 1) { if (data[data_size - 1] >= data_size) { gnutls_assert(); - result = GNUTLS_E_ILLEGAL_PARAMETER; + result = GNUTLS_E_DECRYPTION_FAILED; goto error; } |