Consistent error reporting for encryption/decryption in pgcrypto - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Consistent error reporting for encryption/decryption in pgcrypto
Date
Msg-id 03049139-CB7A-436E-B71B-42696D3E2EF7@yesql.se
Whole thread Raw
Responses Re: Consistent error reporting for encryption/decryption in pgcrypto
List pgsql-hackers
Commit b918bf86c65 added the errorcode PXE_DECRYPT_FAILED to the existing set
of PXE_ error codes.  When pgcrypto was changed to the EVP APIs in 5ff4a67f63,
no new error codes were added in favour of existing ones.  This results in
encryption failures returning PXE_ERR_GENERIC, which seems a bit inconsistent.

The attached introduce PXE_ENCRYPT_FAILED and use that for EVP_EncryptUpdate to
ideally be slightly clearer in case of errors.  Any reason not to do that
instead of using ERR_GENERIC?

cheers ./daniel






Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Disable WAL logging to speed up data loading
Next
From: Alvaro Herrera
Date:
Subject: Re: Autovacuum worker doesn't immediately exit on postmaster death