Re: Consistent error reporting for encryption/decryption in pgcrypto

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Michael Paquier <michael@paquier.xyz>
Cc: Georgios Kokolatos <gkokolatos@protonmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2020-10-31T20:40:12Z
Lists: pgsql-hackers

Attachments

> On 31 Oct 2020, at 02:03, Michael Paquier <michael@paquier.xyz> wrote:

> It seems to me that you are just missing to declare a new error number
> in px.h, so I would suggest to just use -19.

Ah yes, I accidentally fat-fingered the git add -p when splitting up the NSS
patch into bite size pieces. Sorry about that. The attached v2 has the error
declaration.

cheers ./daniel

Commits

  1. Add error code for encryption failure in pgcrypto

  2. Fix combo_decrypt() to throw an error for zero-length input when using a