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 E1mU4JF-0003Du-Du@gemulon.postgresql.org
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 <peter@eisentraut.org>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://www.postgresql.org/message-id/9e9c431c-0adc-7a6d-9b1a-915de1ba3fe7@enterprisedb.com
Backpatch-through: 9.6

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/841075a65cdc2d034dd8a473f25c5f584c8856d7

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: pgcrypto: Check for error return of px_cipher_decrypt()
Next
From: Tom Lane
Date:
Subject: pgsql: Doc: extend warnings about collation-mismatch hazards in postgre