diff --git a/src/backend/distributed/utils/enable_ssl.c b/src/backend/distributed/utils/enable_ssl.c index a6a8dc065..704670b9e 100644 --- a/src/backend/distributed/utils/enable_ssl.c +++ b/src/backend/distributed/utils/enable_ssl.c @@ -8,6 +8,19 @@ *------------------------------------------------------------------------- */ + +/* + * Make sure that functions marked as deprecated in OpenSSL 3.0 don't trigger + * deprecation warnings by indicating that we're using the OpenSSL 1.0.1 + * compatibile API. Postgres does this by already in PG14, so we should not do + * it otherwise we get warnings about redefining this value. + */ +#if PG_VERSION_NUM < PG_VERSION_14 +#ifndef OPENSSL_API_COMPAT +#define OPENSSL_API_COMPAT 0x1000100L +#endif +#endif + #include "postgres.h" #include "distributed/connection_management.h"