]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pgcrypto: Check for error return of px_cipher_decrypt()
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Sat, 25 Sep 2021 09:25:48 +0000 (11:25 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Sat, 25 Sep 2021 09:25:48 +0000 (11:25 +0200)
commit841075a65cdc2d034dd8a473f25c5f584c8856d7
tree3fa16592d4e98d4a4034dde5de75dd61403a1d2e
parent1d1d13bc72aa2d0344520bd2f302262ce2064364
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
contrib/pgcrypto/px.c