Re: scram-sha-256 authentication broken in FIPS mode

Alessandro Gherardi <alessandro.gherardi@yahoo.com>

From: Alessandro Gherardi <alessandro.gherardi@yahoo.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: "pgsql-general@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
Date: 2018-09-07T06:27:33Z
Lists: pgsql-general

Attachments

 Hi Michael,
I'm attaching the output of diff <updated source file> <original source file>.
>  If we could prove that sha2-openssl.c is actually
unreliable even if FIPS is enabled system-wide with either SCRAM
authentication or any of the other hashing functions, then I would be
ready to accept a patch.  Now, as far as I can see and heard from other
folks for at least Linux, if FIPS is enabled at the OS level, then
Postgres would use it automatically and SCRAM is able to work.
Not sure why it works on Linux but not on Windows. That the low-level digest APIs can't be used when FIPS is enabled is by design, other people have encountered that problem, e.g., http://openssl.6102.n7.nabble.com/Low-Level-Digest-if-Fips-mode-td54983.html .
Thanks,Alessandro
    

Commits

  1. Change SHA2 implementation based on OpenSSL to use EVP digest routines