]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3734] Remove unnecessary HAVE_PGSQL_SSL macro
authorAndrei Pavel <andrei@isc.org>
Tue, 13 May 2025 19:32:11 +0000 (22:32 +0300)
committerAndrei Pavel <andrei@isc.org>
Fri, 30 May 2025 07:57:39 +0000 (10:57 +0300)
20 files changed:
config.h.in
meson.build
src/hooks/dhcp/pgsql/pgsql_cb_impl.cc
src/hooks/dhcp/pgsql/pgsql_cb_messages.cc
src/hooks/dhcp/pgsql/pgsql_cb_messages.h
src/hooks/dhcp/pgsql/pgsql_cb_messages.mes
src/hooks/dhcp/pgsql/pgsql_fb_messages.cc
src/hooks/dhcp/pgsql/pgsql_fb_messages.h
src/hooks/dhcp/pgsql/pgsql_fb_messages.mes
src/hooks/dhcp/pgsql/pgsql_hb_messages.cc
src/hooks/dhcp/pgsql/pgsql_hb_messages.h
src/hooks/dhcp/pgsql/pgsql_hb_messages.mes
src/hooks/dhcp/pgsql/pgsql_host_data_source.cc
src/hooks/dhcp/pgsql/pgsql_lb_messages.cc
src/hooks/dhcp/pgsql/pgsql_lb_messages.h
src/hooks/dhcp/pgsql/pgsql_lb_messages.mes
src/hooks/dhcp/pgsql/pgsql_lease_mgr.cc
src/hooks/dhcp/pgsql/pgsql_legal_log.cc
src/hooks/dhcp/pgsql/tests/pgsql_host_data_source_unittest.cc
src/hooks/dhcp/pgsql/tests/pgsql_lease_mgr_unittest.cc

index 4958e2d07b31b0736a265a383da982cb690c549b..42ccf28f3ebd0ac3ddaeeb048ae48a35ac6d7436 100644 (file)
@@ -40,9 +40,6 @@
 /* PostgreSQL is present */
 #mesondefine HAVE_PGSQL
 
-/* PostgreSQL was built with OpenSSL support */
-#mesondefine HAVE_PGSQL_SSL
-
 /* PostgreSQL connection parameter tcp_user_timeout supported */
 #mesondefine HAVE_PGSQL_TCP_USER_TIMEOUT
 
index c30584d627442f80d47ac9a9a8e9c5915657cf77..9bf35e07c08d6113190230321e2e17b5c057b635 100644 (file)
@@ -124,7 +124,6 @@ KEA_MSG_COMPILER = disabler()
 #### Configuration Data
 
 # TODO: Remaining define macros used in code, but not handled by meson:
-# - HAVE_PGSQL_SSL
 # - USE_STATIC_LINK
 
 conf_data = configuration_data(
index 26e9fdc4de689b05d732bf40f54afb9494296986..4d91d9de4d936ed80da2ad93216ed6054dc8e1ec 100644 (file)
@@ -88,21 +88,6 @@ PgSqlConfigBackendImpl::PgSqlConfigBackendImpl(const std::string& space,
     tls += parameters.count("cert-file");
     tls += parameters.count("key-file");
     tls += parameters.count("cipher-list");
-#ifdef HAVE_PGSQL_SSL
-    if ((tls > 0) && !PgSqlConnection::warned_about_tls) {
-        PgSqlConnection::warned_about_tls = true;
-        LOG_INFO(pgsql_cb_logger, PGSQL_CB_TLS_SUPPORT)
-            .arg(DatabaseConnection::redactedAccessString(parameters);
-        PQinitSSL(1);
-    }
-#else
-    if (tls > 0) {
-        LOG_ERROR(pgsql_cb_logger, PGSQL_CB_NO_TLS_SUPPORT)
-            .arg(DatabaseConnection::redactedAccessString(parameters));
-        isc_throw(DbOpenError, "Attempt to configure TLS for PostgreSQL "
-                  << "backend (built with this feature disabled)");
-    }
-#endif
 
     // Create unique timer name per instance.
     timer_name_ = "PgSqlConfigBackend";
@@ -1170,7 +1155,7 @@ PgSqlConfigBackendImpl::addOptionValueBinding(PsqlBindArray& bindings,
     }
 }
 
-void 
+void
 PgSqlConfigBackendImpl::addClientClassesBinding(db::PsqlBindArray& bindings,
                                                 const ClientClasses& client_classes) {
     // Create JSON list of client classes.
index 6817056483cafbbf32d33ec251f345da795edf98..92a67540d6fbd058969f31d4e61bf7f768580e2f 100644 (file)
@@ -184,7 +184,6 @@ extern const isc::log::MessageID PGSQL_CB_GET_SUBNET6_BY_PREFIX = "PGSQL_CB_GET_
 extern const isc::log::MessageID PGSQL_CB_GET_SUBNET6_BY_SUBNET_ID = "PGSQL_CB_GET_SUBNET6_BY_SUBNET_ID";
 extern const isc::log::MessageID PGSQL_CB_GET_TYPE4 = "PGSQL_CB_GET_TYPE4";
 extern const isc::log::MessageID PGSQL_CB_GET_TYPE6 = "PGSQL_CB_GET_TYPE6";
-extern const isc::log::MessageID PGSQL_CB_NO_TLS_SUPPORT = "PGSQL_CB_NO_TLS_SUPPORT";
 extern const isc::log::MessageID PGSQL_CB_RECONNECT_ATTEMPT_FAILED4 = "PGSQL_CB_RECONNECT_ATTEMPT_FAILED4";
 extern const isc::log::MessageID PGSQL_CB_RECONNECT_ATTEMPT_FAILED6 = "PGSQL_CB_RECONNECT_ATTEMPT_FAILED6";
 extern const isc::log::MessageID PGSQL_CB_RECONNECT_ATTEMPT_SCHEDULE4 = "PGSQL_CB_RECONNECT_ATTEMPT_SCHEDULE4";
@@ -193,7 +192,6 @@ extern const isc::log::MessageID PGSQL_CB_RECONNECT_FAILED4 = "PGSQL_CB_RECONNEC
 extern const isc::log::MessageID PGSQL_CB_RECONNECT_FAILED6 = "PGSQL_CB_RECONNECT_FAILED6";
 extern const isc::log::MessageID PGSQL_CB_REGISTER_BACKEND_TYPE4 = "PGSQL_CB_REGISTER_BACKEND_TYPE4";
 extern const isc::log::MessageID PGSQL_CB_REGISTER_BACKEND_TYPE6 = "PGSQL_CB_REGISTER_BACKEND_TYPE6";
-extern const isc::log::MessageID PGSQL_CB_TLS_SUPPORT = "PGSQL_CB_TLS_SUPPORT";
 extern const isc::log::MessageID PGSQL_CB_UNREGISTER_BACKEND_TYPE4 = "PGSQL_CB_UNREGISTER_BACKEND_TYPE4";
 extern const isc::log::MessageID PGSQL_CB_UNREGISTER_BACKEND_TYPE6 = "PGSQL_CB_UNREGISTER_BACKEND_TYPE6";
 
@@ -380,7 +378,6 @@ const char* values[] = {
     "PGSQL_CB_GET_SUBNET6_BY_SUBNET_ID", "retrieving subnet by subnet id: %1",
     "PGSQL_CB_GET_TYPE4", "get type",
     "PGSQL_CB_GET_TYPE6", "get type",
-    "PGSQL_CB_NO_TLS_SUPPORT", "Attempt to configure TLS (unsupported for PostgreSQL): %1",
     "PGSQL_CB_RECONNECT_ATTEMPT_FAILED4", "database reconnect failed: %1",
     "PGSQL_CB_RECONNECT_ATTEMPT_FAILED6", "database reconnect failed: %1",
     "PGSQL_CB_RECONNECT_ATTEMPT_SCHEDULE4", "scheduling attempt %1 of %2 in %3 milliseconds",
@@ -389,7 +386,6 @@ const char* values[] = {
     "PGSQL_CB_RECONNECT_FAILED6", "maximum number of database reconnect attempts: %1, has been exhausted without success",
     "PGSQL_CB_REGISTER_BACKEND_TYPE4", "register backend",
     "PGSQL_CB_REGISTER_BACKEND_TYPE6", "register backend",
-    "PGSQL_CB_TLS_SUPPORT", "Attempt to configure TLS: %1",
     "PGSQL_CB_UNREGISTER_BACKEND_TYPE4", "unregister backend",
     "PGSQL_CB_UNREGISTER_BACKEND_TYPE6", "unregister backend",
     NULL
index 9a301e6445ec815da9d36c2ae87a2ef0d91d3523..a594d8aafa5b6efdccfd4e0284b2767ae323d174 100644 (file)
@@ -185,7 +185,6 @@ extern const isc::log::MessageID PGSQL_CB_GET_SUBNET6_BY_PREFIX;
 extern const isc::log::MessageID PGSQL_CB_GET_SUBNET6_BY_SUBNET_ID;
 extern const isc::log::MessageID PGSQL_CB_GET_TYPE4;
 extern const isc::log::MessageID PGSQL_CB_GET_TYPE6;
-extern const isc::log::MessageID PGSQL_CB_NO_TLS_SUPPORT;
 extern const isc::log::MessageID PGSQL_CB_RECONNECT_ATTEMPT_FAILED4;
 extern const isc::log::MessageID PGSQL_CB_RECONNECT_ATTEMPT_FAILED6;
 extern const isc::log::MessageID PGSQL_CB_RECONNECT_ATTEMPT_SCHEDULE4;
@@ -194,7 +193,6 @@ extern const isc::log::MessageID PGSQL_CB_RECONNECT_FAILED4;
 extern const isc::log::MessageID PGSQL_CB_RECONNECT_FAILED6;
 extern const isc::log::MessageID PGSQL_CB_REGISTER_BACKEND_TYPE4;
 extern const isc::log::MessageID PGSQL_CB_REGISTER_BACKEND_TYPE6;
-extern const isc::log::MessageID PGSQL_CB_TLS_SUPPORT;
 extern const isc::log::MessageID PGSQL_CB_UNREGISTER_BACKEND_TYPE4;
 extern const isc::log::MessageID PGSQL_CB_UNREGISTER_BACKEND_TYPE6;
 
index ac324d746b7f4bdac373ee5c90e12000162c5bd2..4f86c944e1ca92cf988086539d99b5a392f02050 100644 (file)
@@ -720,11 +720,6 @@ Debug message issued when triggered an action to retrieve type
 Logged at debug log level 40.
 Debug message issued when triggered an action to retrieve type
 
-% PGSQL_CB_NO_TLS_SUPPORT Attempt to configure TLS (unsupported for PostgreSQL): %1
-This error message is printed when TLS support was required in the Kea
-configuration: Kea was built with this feature disabled for PostgreSQL.
-The parameters of the connection are logged.
-
 % PGSQL_CB_RECONNECT_ATTEMPT_FAILED4 database reconnect failed: %1
 Error message issued when an attempt to reconnect has failed.
 
@@ -757,12 +752,6 @@ Debug message issued when triggered an action to register backend
 Logged at debug log level 40.
 Debug message issued when triggered an action to register backend
 
-% PGSQL_CB_TLS_SUPPORT Attempt to configure TLS: %1
-This informational message is printed when TLS support was required in
-the Kea configuration: The TLS support in PostgreSQL will be initialized but
-its configuration is fully managed outside the C API.
-The parameters of the connection are logged.
-
 % PGSQL_CB_UNREGISTER_BACKEND_TYPE4 unregister backend
 Logged at debug log level 40.
 Debug message issued when triggered an action to unregister backend
index 214799d77591cfacf4a475a00b3e363ec7a71484..fe25c2b19484740e513d1b6913516d3ea94a774c 100644 (file)
@@ -16,10 +16,8 @@ extern const isc::log::MessageID LEGAL_LOG_PGSQL_FATAL_ERROR = "LEGAL_LOG_PGSQL_
 extern const isc::log::MessageID LEGAL_LOG_PGSQL_GET_VERSION = "LEGAL_LOG_PGSQL_GET_VERSION";
 extern const isc::log::MessageID LEGAL_LOG_PGSQL_INSERT_LOG = "LEGAL_LOG_PGSQL_INSERT_LOG";
 extern const isc::log::MessageID LEGAL_LOG_PGSQL_INVALID_ACCESS = "LEGAL_LOG_PGSQL_INVALID_ACCESS";
-extern const isc::log::MessageID LEGAL_LOG_PGSQL_NO_TLS_SUPPORT = "LEGAL_LOG_PGSQL_NO_TLS_SUPPORT";
 extern const isc::log::MessageID LEGAL_LOG_PGSQL_ROLLBACK = "LEGAL_LOG_PGSQL_ROLLBACK";
 extern const isc::log::MessageID LEGAL_LOG_PGSQL_START_TRANSACTION = "LEGAL_LOG_PGSQL_START_TRANSACTION";
-extern const isc::log::MessageID LEGAL_LOG_PGSQL_TLS_SUPPORT = "LEGAL_LOG_PGSQL_TLS_SUPPORT";
 extern const isc::log::MessageID PGSQL_FB_DB = "PGSQL_FB_DB";
 
 } // namespace dhcp
@@ -37,10 +35,8 @@ const char* values[] = {
     "LEGAL_LOG_PGSQL_GET_VERSION", "obtaining schema version information",
     "LEGAL_LOG_PGSQL_INSERT_LOG", "Adding a log entry to the database: %1",
     "LEGAL_LOG_PGSQL_INVALID_ACCESS", "invalid database access string: %1",
-    "LEGAL_LOG_PGSQL_NO_TLS_SUPPORT", "Attempt to configure TLS (unsupported for PostgreSQL): %1",
     "LEGAL_LOG_PGSQL_ROLLBACK", "rolling back PostgreSQL database",
     "LEGAL_LOG_PGSQL_START_TRANSACTION", "starting a new PostgreSQL transaction",
-    "LEGAL_LOG_PGSQL_TLS_SUPPORT", "Attempt to configure TLS: %1",
     "PGSQL_FB_DB", "opening PostgreSQL log database: %1",
     NULL
 };
index 13893b4191dc85c4d0d48b9842b462b3788d1169..871a01fa5c9afdcaa2c4654bb9cc69043fda6e7c 100644 (file)
@@ -17,10 +17,8 @@ extern const isc::log::MessageID LEGAL_LOG_PGSQL_FATAL_ERROR;
 extern const isc::log::MessageID LEGAL_LOG_PGSQL_GET_VERSION;
 extern const isc::log::MessageID LEGAL_LOG_PGSQL_INSERT_LOG;
 extern const isc::log::MessageID LEGAL_LOG_PGSQL_INVALID_ACCESS;
-extern const isc::log::MessageID LEGAL_LOG_PGSQL_NO_TLS_SUPPORT;
 extern const isc::log::MessageID LEGAL_LOG_PGSQL_ROLLBACK;
 extern const isc::log::MessageID LEGAL_LOG_PGSQL_START_TRANSACTION;
-extern const isc::log::MessageID LEGAL_LOG_PGSQL_TLS_SUPPORT;
 extern const isc::log::MessageID PGSQL_FB_DB;
 
 } // namespace dhcp
index b7f5ee8592886a02cccb65300264b7c98f8a8372..1f687b708001efc3ecdc0ad4ddd1581cae00dc57 100644 (file)
@@ -50,11 +50,6 @@ and the attempt ended in error.  The access string in question - which
 should be of the form 'keyword=value keyword=value...' is included in
 the message.
 
-% LEGAL_LOG_PGSQL_NO_TLS_SUPPORT Attempt to configure TLS (unsupported for PostgreSQL): %1
-This error message is printed when TLS support was required in the Kea
-configuration: Kea was built with this feature disabled for PostgreSQL.
-The parameters of the connection are logged.
-
 % LEGAL_LOG_PGSQL_ROLLBACK rolling back PostgreSQL database
 The code has issued a rollback call.  All outstanding transaction will
 be rolled back and not committed to the database.
@@ -68,12 +63,6 @@ inserted into multiple tables with multiple INSERT statements
 and there may be a need to rollback the whole transaction if
 any of these INSERT statements fail.
 
-% LEGAL_LOG_PGSQL_TLS_SUPPORT Attempt to configure TLS: %1
-This informational message is printed when TLS support was required in
-the Kea configuration: The TLS support in PostgreSQL will be initialized but
-its configuration is fully managed outside the C API.
-The parameters of the connection are logged.
-
 % PGSQL_FB_DB opening PostgreSQL log database: %1
 This informational message is logged when a legal log hook library is
 about to open a PostgreSQL log database.  The parameters of the
index 98dbb2a414d6a7d09b161c9ef86be1b88fdae67f..ffd427e5c27eb4ae65c58c5e5f747b9a0db0d44e 100644 (file)
@@ -13,8 +13,6 @@ extern const isc::log::MessageID PGSQL_HB_DB_READONLY = "PGSQL_HB_DB_READONLY";
 extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_ATTEMPT_FAILED = "PGSQL_HB_DB_RECONNECT_ATTEMPT_FAILED";
 extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE = "PGSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE";
 extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_FAILED = "PGSQL_HB_DB_RECONNECT_FAILED";
-extern const isc::log::MessageID PGSQL_HB_NO_TLS_SUPPORT = "PGSQL_HB_NO_TLS_SUPPORT";
-extern const isc::log::MessageID PGSQL_HB_TLS_SUPPORT = "PGSQL_HB_TLS_SUPPORT";
 
 } // namespace dhcp
 } // namespace isc
@@ -28,8 +26,6 @@ const char* values[] = {
     "PGSQL_HB_DB_RECONNECT_ATTEMPT_FAILED", "database reconnect failed: %1",
     "PGSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE", "scheduling attempt %1 of %2 in %3 milliseconds",
     "PGSQL_HB_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success",
-    "PGSQL_HB_NO_TLS_SUPPORT", "Attempt to configure TLS (unsupported for PostgreSQL): %1",
-    "PGSQL_HB_TLS_SUPPORT", "Attempt to configure TLS: %1",
     NULL
 };
 
index ba403b4b3f2049ae9a75d4ba020fca4c8f51daaa..8f3ea8c9638bb335584f0f9ff95f15d44d320b72 100644 (file)
@@ -14,8 +14,6 @@ extern const isc::log::MessageID PGSQL_HB_DB_READONLY;
 extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_ATTEMPT_FAILED;
 extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE;
 extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_FAILED;
-extern const isc::log::MessageID PGSQL_HB_NO_TLS_SUPPORT;
-extern const isc::log::MessageID PGSQL_HB_TLS_SUPPORT;
 
 } // namespace dhcp
 } // namespace isc
index e9ac3d75d38d5eb6f0c6957770f77871352f80ec..054dadbf11d96fb27cd1af66b28402bf0732aba4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2024 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2024-2025 Internet Systems Consortium, Inc. ("ISC")
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -34,14 +34,3 @@ is attempting to reconnect automatically.
 % PGSQL_HB_DB_RECONNECT_FAILED maximum number of database reconnect attempts: %1, has been exhausted without success
 An error message issued when the server failed to reconnect. Loss of connectivity
 is typically a network or database server issue.
-
-% PGSQL_HB_NO_TLS_SUPPORT Attempt to configure TLS (unsupported for PostgreSQL): %1
-This error message is printed when TLS support was required in the Kea
-configuration: Kea was built with this feature disabled for PostgreSQL.
-The parameters of the connection are logged.
-
-% PGSQL_HB_TLS_SUPPORT Attempt to configure TLS: %1
-This informational message is printed when TLS support was required in
-the Kea configuration: The TLS support in PostgreSQL will be initialized but
-its configuration is fully managed outside the C API.
-The parameters of the connection are logged.
index 491c13edc5099922a19aadaeb93bd9b2c3915bf3..6995bc70c1ae10a6e1f67f83fb1a5d2089f508f0 100644 (file)
@@ -2322,21 +2322,6 @@ PgSqlHostDataSourceImpl::PgSqlHostDataSourceImpl(const DatabaseConnection::Param
     tls += parameters.count("cert-file");
     tls += parameters.count("key-file");
     tls += parameters.count("cipher-list");
-#ifdef HAVE_PGSQL_SSL
-    if ((tls > 0) && !PgSqlConnection::warned_about_tls) {
-        PgSqlConnection::warned_about_tls = true;
-        LOG_INFO(pgsql_hb_logger, PGSQL_HB_TLS_SUPPORT)
-            .arg(DatabaseConnection::redactedAccessString(parameters_));
-        PQinitSSL(1);
-    }
-#else
-    if (tls > 0) {
-        LOG_ERROR(pgsql_hb_logger, PGSQL_HB_NO_TLS_SUPPORT)
-            .arg(DatabaseConnection::redactedAccessString(parameters_));
-        isc_throw(DbOpenError, "Attempt to configure TLS for PostgreSQL "
-                  << "backend (built with this feature disabled)");
-    }
-#endif
 
     // Create unique timer name per instance.
     timer_name_ = "PgSqlHostMgr[";
index b6af53fcf75567a5644b8a4251cf41cab954cf63..8bcbad8df98bdd63d152c94f48820df1ae8547cd 100644 (file)
@@ -46,9 +46,7 @@ extern const isc::log::MessageID PGSQL_LB_GET_SUBID_HWADDR = "PGSQL_LB_GET_SUBID
 extern const isc::log::MessageID PGSQL_LB_GET_SUBID_PAGE6 = "PGSQL_LB_GET_SUBID_PAGE6";
 extern const isc::log::MessageID PGSQL_LB_GET_VERSION = "PGSQL_LB_GET_VERSION";
 extern const isc::log::MessageID PGSQL_LB_NEGATIVE_LEASES_STAT = "PGSQL_LB_NEGATIVE_LEASES_STAT";
-extern const isc::log::MessageID PGSQL_LB_NO_TLS_SUPPORT = "PGSQL_LB_NO_TLS_SUPPORT";
 extern const isc::log::MessageID PGSQL_LB_ROLLBACK = "PGSQL_LB_ROLLBACK";
-extern const isc::log::MessageID PGSQL_LB_TLS_SUPPORT = "PGSQL_LB_TLS_SUPPORT";
 extern const isc::log::MessageID PGSQL_LB_UPDATE_ADDR4 = "PGSQL_LB_UPDATE_ADDR4";
 extern const isc::log::MessageID PGSQL_LB_UPDATE_ADDR6 = "PGSQL_LB_UPDATE_ADDR6";
 extern const isc::log::MessageID PGSQL_LB_UPGRADE_EXTENDED_INFO4 = "PGSQL_LB_UPGRADE_EXTENDED_INFO4";
@@ -103,9 +101,7 @@ const char* values[] = {
     "PGSQL_LB_GET_SUBID_PAGE6", "obtaining at most %1 IPv6 leases starting from address %2 for subnet ID %3",
     "PGSQL_LB_GET_VERSION", "obtaining schema version information",
     "PGSQL_LB_NEGATIVE_LEASES_STAT", "recount of leases returned a negative value",
-    "PGSQL_LB_NO_TLS_SUPPORT", "Attempt to configure TLS (unsupported for PostgreSQL): %1",
     "PGSQL_LB_ROLLBACK", "rolling back PostgreSQL database",
-    "PGSQL_LB_TLS_SUPPORT", "Attempt to configure TLS: %1",
     "PGSQL_LB_UPDATE_ADDR4", "updating IPv4 lease for address %1",
     "PGSQL_LB_UPDATE_ADDR6", "updating IPv6 lease for address %1, lease type %2",
     "PGSQL_LB_UPGRADE_EXTENDED_INFO4", "upgrading IPv4 leases done in %1 pages with %2 updated leases",
index fc9ae19030e884208fce2ae26226f95e637a4913..b208c33de9fc55f91f7e74baaf038fc998473ab6 100644 (file)
@@ -47,9 +47,7 @@ extern const isc::log::MessageID PGSQL_LB_GET_SUBID_HWADDR;
 extern const isc::log::MessageID PGSQL_LB_GET_SUBID_PAGE6;
 extern const isc::log::MessageID PGSQL_LB_GET_VERSION;
 extern const isc::log::MessageID PGSQL_LB_NEGATIVE_LEASES_STAT;
-extern const isc::log::MessageID PGSQL_LB_NO_TLS_SUPPORT;
 extern const isc::log::MessageID PGSQL_LB_ROLLBACK;
-extern const isc::log::MessageID PGSQL_LB_TLS_SUPPORT;
 extern const isc::log::MessageID PGSQL_LB_UPDATE_ADDR4;
 extern const isc::log::MessageID PGSQL_LB_UPDATE_ADDR6;
 extern const isc::log::MessageID PGSQL_LB_UPGRADE_EXTENDED_INFO4;
index fd97bf14b534be58daf31a3b6439cbb003ed2f1d..ecacaf3146387c4965f3a5e5c0f0b55a301e0a34 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2024 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2024-2025 Internet Systems Consortium, Inc. ("ISC")
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -216,22 +216,11 @@ in the PostgreSQL database returned a negative value. This shows a problem
 which can be fixed only by an offline direct recount on the database.
 This message is issued only once.
 
-% PGSQL_LB_NO_TLS_SUPPORT Attempt to configure TLS (unsupported for PostgreSQL): %1
-This error message is printed when TLS support was required in the Kea
-configuration: Kea was built with this feature disabled for PostgreSQL.
-The parameters of the connection are logged.
-
 % PGSQL_LB_ROLLBACK rolling back PostgreSQL database
 Logged at debug log level 50.
 The code has issued a rollback call. All outstanding transaction will
 be rolled back and not committed to the database.
 
-% PGSQL_LB_TLS_SUPPORT Attempt to configure TLS: %1
-This informational message is printed when TLS support was required in
-the Kea configuration: The TLS support in PostgreSQL will be initialized but
-its configuration is fully managed outside the C API.
-The parameters of the connection are logged.
-
 % PGSQL_LB_UPDATE_ADDR4 updating IPv4 lease for address %1
 Logged at debug log level 50.
 A debug message issued when the server is attempting to update IPv4
index fe57525607ddca49ee870d64624dca9b2e3e6a3f..9d0884eafe80b7d68b4d2d0d66a82158dc4e4947 100644 (file)
@@ -1625,21 +1625,6 @@ PgSqlLeaseMgr::PgSqlLeaseMgr(const DatabaseConnection::ParameterMap& parameters)
     tls += parameters.count("cert-file");
     tls += parameters.count("key-file");
     tls += parameters.count("cipher-list");
-#ifdef HAVE_PGSQL_SSL
-    if ((tls > 0) && !PgSqlConnection::warned_about_tls) {
-        PgSqlConnection::warned_about_tls = true;
-        LOG_INFO(pgsql_lb_logger, PGSQL_LB_TLS_SUPPORT)
-            .arg(DatabaseConnection::redactedAccessString(parameters_));
-        PQinitSSL(1);
-    }
-#else
-    if (tls > 0) {
-        LOG_ERROR(pgsql_lb_logger, PGSQL_LB_NO_TLS_SUPPORT)
-            .arg(DatabaseConnection::redactedAccessString(parameters_));
-        isc_throw(DbOpenError, "Attempt to configure TLS for PostgreSQL "
-                  << "backend (built with this feature disabled)");
-    }
-#endif
 
     // Create unique timer name per instance.
     timer_name_ = "PgSqlLeaseMgr[";
index 49a8a5239167fd6a6fcf63ec2f12c230571265f1..a1599a199226bec385c0efa9e1794dc55f836365 100644 (file)
@@ -187,21 +187,6 @@ void PgSqlStore::open() {
     tls += parameters.count("cert-file");
     tls += parameters.count("key-file");
     tls += parameters.count("cipher-list");
-#ifdef HAVE_PGSQL_SSL
-    if ((tls > 0) && !PgSqlConnection::warned_about_tls) {
-        PgSqlConnection::warned_about_tls = true;
-        LOG_INFO(pgsql_fb_logger, LEGAL_LOG_PGSQL_TLS_SUPPORT)
-            .arg(DatabaseConnection::redactedAccessString(parameters));
-        PQinitSSL(1);
-    }
-#else
-    if (tls > 0) {
-        LOG_ERROR(pgsql_fb_logger, LEGAL_LOG_PGSQL_NO_TLS_SUPPORT)
-            .arg(DatabaseConnection::redactedAccessString(parameters));
-        isc_throw(DbOpenError, "Attempt to configure TLS for PostgreSQL "
-                  << "backend (built with this feature disabled)");
-    }
-#endif
 
     // Test schema version first.
     pair<uint32_t, uint32_t> code_version(PGSQL_SCHEMA_VERSION_MAJOR,
index 194753753225f42f408a5238610e7f64c35e4c17..74ab4f044d1be92f793388d01c647776523b7445 100644 (file)
@@ -245,15 +245,9 @@ TEST(PgSqlHostDataSource, OpenDatabase) {
         NoDatabaseName);
 
     // Check for SSL/TLS support.
-#ifdef HAVE_PGSQL_SSL
     EXPECT_NO_THROW(HostMgr::addBackend(connectionString(
         PGSQL_VALID_TYPE, VALID_NAME, VALID_HOST, VALID_USER, VALID_PASSWORD,
         0, 0, 0, 0, VALID_CA)));
-#else
-    EXPECT_THROW(HostMgr::addBackend(connectionString(
-        PGSQL_VALID_TYPE, VALID_NAME, VALID_HOST, VALID_USER, VALID_PASSWORD,
-        0, 0, 0, 0, VALID_CA)), DbOpenError);
-#endif
 
     // Tidy up after the test
     destroyPgSQLSchema();
index a1b91860a1dc629badce4c840550c08377515806..801ab2c82d70d86daa3bf40d94d24d37c99d6fdc 100644 (file)
@@ -210,15 +210,9 @@ TEST(PgSqlOpenTest, OpenDatabase) {
         NoDatabaseName);
 
     // Check for SSL/TLS support.
-#ifdef HAVE_PGSQL_SSL
     EXPECT_NO_THROW(LeaseMgrFactory::create(connectionString(
         PGSQL_VALID_TYPE, VALID_NAME, VALID_HOST, VALID_USER, VALID_PASSWORD,
         0, 0, 0, 0, VALID_CA)));
-#else
-    EXPECT_THROW(LeaseMgrFactory::create(connectionString(
-        PGSQL_VALID_TYPE, VALID_NAME, VALID_HOST, VALID_USER, VALID_PASSWORD,
-        0, 0, 0, 0, VALID_CA)), DbOpenError);
-#endif
 
     // Check for extended info tables.
     const char* EX_INFO = "extended-info-tables=true";