pgsql: Clean up error message reported after \password encryption failu

Started by Tom Laneover 4 years ago2 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Clean up error message reported after \password encryption failure.

Experimenting with FIPS mode enabled, I saw

regression=# \password joe
Enter new password for user "joe":
Enter it again:
could not encrypt password: disabled for FIPS
out of memory

because PQencryptPasswordConn was still of the opinion that "out of
memory" is always appropriate to print.

Minor oversight in b69aba745. Like that one, back-patch to v14.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9cb5518b7ff69ab3bbc422313c69d54696fe8472

Modified Files
--------------
src/interfaces/libpq/fe-auth.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

#2Michael Paquier
michael@paquier.xyz
In reply to: Tom Lane (#1)
Re: pgsql: Clean up error message reported after \password encryption failu

On Tue, Jan 11, 2022 at 05:03:17PM +0000, Tom Lane wrote:

Clean up error message reported after \password encryption failure.

Thanks!
--
Michael