PostgreSQL 18 FIPS mode in Windows
I have previously been compiling my own FIPS-compliant PostgreSQL and OpenSSL in Windows for FIPS compliance, but the documentation for 18 makes it sound like it is ready out of the box, and it would certainly be nice to just grab the latest off the shelf installer and use it.
The steps I have already taken are:
- Install PostgreSQL 18.6 windows-x64
- Install OpenSSL 3.5.8 with FIPS Provider 3.1.2
- Enable pgcrypto extension via pgAdmin
- set builtin_crypto_enabled to 'fips'
- Executing SELECT fips_mode(); always returns false.
- Verified FIPS is not being enforced by executing SELECT encode(digest('test', 'md5'), 'hex'); and it always returns a value.
What am I missing? Thank you,
Mark Sutyak
sutyak <sutyak@proton.me> writes:
The steps I have already taken are:
- Install PostgreSQL 18.6 windows-x64
- Install OpenSSL 3.5.8 with FIPS Provider 3.1.2
- Enable pgcrypto extension via pgAdmin
- set builtin_crypto_enabled to 'fips'
- Executing SELECT fips_mode(); always returns false.
- Verified FIPS is not being enforced by executing SELECT encode(digest('test', 'md5'), 'hex'); and it always returns a value.
What am I missing? Thank you,
'builtin_crypto_enabled = fips' merely tells pgcrypto to expect
failure of relevant calls. It does not cause OpenSSL to actually
go into FIPS mode. You'd have to consult the OpenSSL docs to
find out how to do that.
regards, tom lane
On 24 Sep 2026, at 22:13, Tom Lane <tgl@sss.pgh.pa.us> wrote:
sutyak <sutyak@proton.me> writes:
The steps I have already taken are:
- Install PostgreSQL 18.6 windows-x64
- Install OpenSSL 3.5.8 with FIPS Provider 3.1.2
- Enable pgcrypto extension via pgAdmin
- set builtin_crypto_enabled to 'fips'
- Executing SELECT fips_mode(); always returns false.
- Verified FIPS is not being enforced by executing SELECT encode(digest('test', 'md5'), 'hex'); and it always returns a value.What am I missing? Thank you,
'builtin_crypto_enabled = fips' merely tells pgcrypto to expect
failure of relevant calls. It does not cause OpenSSL to actually
go into FIPS mode. You'd have to consult the OpenSSL docs to
find out how to do that.
+1. You need to enable the FIPS provider in openssl.conf and make sure to
disable the legacy provider. The builtin_crypto_enabled setting simply makes
sure to never call non-FIPS certified crypto when OpenSSL is operating in fips
mode, you can also set it to 'off' and disallow non-FIPS certified crypto
regardless.
--
Daniel Gustafsson
On 9/24/26 16:16, Daniel Gustafsson wrote:
On 24 Sep 2026, at 22:13, Tom Lane <tgl@sss.pgh.pa.us> wrote:
sutyak <sutyak@proton.me> writes:
The steps I have already taken are:
- Install PostgreSQL 18.6 windows-x64
- Install OpenSSL 3.5.8 with FIPS Provider 3.1.2
- Enable pgcrypto extension via pgAdmin
- set builtin_crypto_enabled to 'fips'
- Executing SELECT fips_mode(); always returns false.
- Verified FIPS is not being enforced by executing SELECT encode(digest('test', 'md5'), 'hex'); and it always returns a value.What am I missing? Thank you,
'builtin_crypto_enabled = fips' merely tells pgcrypto to expect
failure of relevant calls. It does not cause OpenSSL to actually
go into FIPS mode. You'd have to consult the OpenSSL docs to
find out how to do that.+1. You need to enable the FIPS provider in openssl.conf and make sure to
disable the legacy provider. The builtin_crypto_enabled setting simply makes
sure to never call non-FIPS certified crypto when OpenSSL is operating in fips
mode, you can also set it to 'off' and disallow non-FIPS certified crypto
regardless.
Also to be clear, the distributor of the openssl library used must get
their specific bits validated in order to be actually FIPS compliant if
compliance is what you are after.
--
Joe Conway
PostgreSQL Contributors Team
Amazon Web Services: https://aws.amazon.com
I forgot to mention I did ensure FIPS is the only option enabled in OpenSSL. Verified by running openssl.exe list-providers.
Mark
Sent from Proton Mail for Android.
-------- Original Message --------
On Thursday, 09/24/26 at 16:17 Daniel Gustafsson <daniel@yesql.se> wrote:
On 24 Sep 2026, at 22:13, Tom Lane <tgl@sss.pgh.pa.us> wrote:
sutyak <sutyak@proton.me> writes:
The steps I have already taken are:
- Install PostgreSQL 18.6 windows-x64
- Install OpenSSL 3.5.8 with FIPS Provider 3.1.2
- Enable pgcrypto extension via pgAdmin
- set builtin_crypto_enabled to 'fips'
- Executing SELECT fips_mode(); always returns false.
- Verified FIPS is not being enforced by executing SELECT encode(digest('test', 'md5'), 'hex'); and it always returns a value.What am I missing? Thank you,
'builtin_crypto_enabled = fips' merely tells pgcrypto to expect
failure of relevant calls. It does not cause OpenSSL to actually
go into FIPS mode. You'd have to consult the OpenSSL docs to
find out how to do that.
+1. You need to enable the FIPS provider in openssl.conf and make sure to
disable the legacy provider. The builtin_crypto_enabled setting simply makes
sure to never call non-FIPS certified crypto when OpenSSL is operating in fips
mode, you can also set it to 'off' and disallow non-FIPS certified crypto
regardless.
--
Daniel Gustafsson
On 24 Sep 2026, at 22:54, sutyak <sutyak@proton.me> wrote:
I forgot to mention I did ensure FIPS is the only option enabled in OpenSSL. Verified by running openssl.exe list-providers.
Is that using the same configuration as the OpenSSL used by Postgres? Is it
even the same OpenSSL used by Postgres? If you are using the Windows Installer
from EDB I believe they are using a special hardcoded openssldir where the
config must reside.
--
Daniel Gustafsson
That is something I should have considered. Do you know the default PostgeSQL OpenSSL path? If not I can pull the source and see what it is there.
Mark Sutyak
Sent from Proton Mail for Android.
-------- Original Message --------
On Thursday, 09/24/26 at 17:49 Daniel Gustafsson <daniel@yesql.se> wrote:
On 24 Sep 2026, at 22:54, sutyak <sutyak@proton.me> wrote:
I forgot to mention I did ensure FIPS is the only option enabled in OpenSSL. Verified by running openssl.exe list-providers.
Is that using the same configuration as the OpenSSL used by Postgres? Is it
even the same OpenSSL used by Postgres? If you are using the Windows Installer
from EDB I believe they are using a special hardcoded openssldir where the
config must reside.
--
Daniel Gustafsson
sutyak <sutyak@proton.me> writes:
That is something I should have considered. Do you know the default PostgeSQL OpenSSL path? If not I can pull the source and see what it is there.
AFAIK this question is outside the Postgres source code, and rather is
something to do with the OpenSSL that's bundled in EDB's installer.
You'd have to look at EDB's documentation.
regards, tom lane
Tom, I believe you are correct. Thank you all for the help.
Mark Sutyak
Sent with Proton Mail secure email.
On Thursday, September 24th, 2026 at 6:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Show quoted text
sutyak <sutyak@proton.me> writes:
That is something I should have considered. Do you know the default PostgeSQL OpenSSL path? If not I can pull the source and see what it is there.
AFAIK this question is outside the Postgres source code, and rather is
something to do with the OpenSSL that's bundled in EDB's installer.
You'd have to look at EDB's documentation.regards, tom lane