pgsql: pgcrypto: Check for error return of px_cipher_decrypt() - Mailing list pgsql-committers

From Daniel Gustafsson
Subject pgsql: pgcrypto: Check for error return of px_cipher_decrypt()
Date
Msg-id [email protected]
Whole thread Raw
List pgsql-committers
pgcrypto: Check for error return of px_cipher_decrypt()

This has previously not been a problem (that anyone ever reported),
but in future OpenSSL versions (3.0.0), where legacy ciphers are/can
be disabled, this is the place where this is reported.  So we need to
catch the error here, otherwise the higher-level functions would
return garbage.  The nearby encryption code already handled errors
similarly.

Author: Peter Eisentraut <[email protected]>
Reviewed-by: Daniel Gustafsson <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 9.6

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a69e1506f618d4577bf7fdbfea51924a44c6e7de

Modified Files
--------------
contrib/pgcrypto/px.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: pgsql: Add alternative output for OpenSSL 3 without legacy loaded
Next
From: Daniel Gustafsson
Date:
Subject: pgsql: pgcrypto: Check for error return of px_cipher_decrypt()