1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

pgcrypto: Add function to check FIPS mode

This adds a SQL callable function for reading and returning the status
of FIPS configuration of OpenSSL.  If OpenSSL is operating with FIPS
enabled it will return true, otherwise false.  As this adds a function
to the SQL file, bump the extension version to 1.4.

Author: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Joe Conway <mail@joeconway.com>
Discussion: https://postgr.es/m/8f979145-e206-475a-a31b-73c977a4134c@joeconway.com
This commit is contained in:
Daniel Gustafsson
2025-01-24 14:18:40 +01:00
parent c44c2d2759
commit 924d89a354
8 changed files with 65 additions and 2 deletions

View File

@ -450,6 +450,14 @@ pg_random_uuid(PG_FUNCTION_ARGS)
return gen_random_uuid(fcinfo);
}
PG_FUNCTION_INFO_V1(pg_check_fipsmode);
Datum
pg_check_fipsmode(PG_FUNCTION_ARGS)
{
PG_RETURN_BOOL(CheckFIPSMode());
}
static void *
find_provider(text *name,
PFN provider_lookup,