diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile index fe2af575c5..b36a765764 100644 --- a/src/interfaces/libpq/Makefile +++ b/src/interfaces/libpq/Makefile @@ -13,7 +13,7 @@ subdir = src/interfaces/libpq top_builddir = ../../.. include $(top_builddir)/src/Makefile.global -export with_ssl +export with_ssl with_gssapi with_krb_srvnam PGFILEDESC = "PostgreSQL Access Library" diff --git a/src/interfaces/libpq/meson.build b/src/interfaces/libpq/meson.build index be6fadaea2..ed2a4048d1 100644 --- a/src/interfaces/libpq/meson.build +++ b/src/interfaces/libpq/meson.build @@ -118,8 +118,13 @@ tests += { 't/002_api.pl', 't/003_load_balance_host_list.pl', 't/004_load_balance_dns.pl', + 't/005_negotiate_encryption.pl', ], - 'env': {'with_ssl': ssl_library}, + 'env': { + 'with_ssl': ssl_library, + 'with_gssapi': gssapi.found() ? 'yes' : 'no', + 'with_krb_srvnam': 'postgres', + }, }, } diff --git a/src/test/libpq_encryption/t/001_negotiate_encryption.pl b/src/interfaces/libpq/t/005_negotiate_encryption.pl similarity index 99% rename from src/test/libpq_encryption/t/001_negotiate_encryption.pl rename to src/interfaces/libpq/t/005_negotiate_encryption.pl index d07d9498bb..b369289ef1 100644 --- a/src/test/libpq_encryption/t/001_negotiate_encryption.pl +++ b/src/interfaces/libpq/t/005_negotiate_encryption.pl @@ -129,7 +129,7 @@ if ($gss_supported != 0) if ($ssl_supported != 0) { - my $certdir = dirname(__FILE__) . "/../../ssl/ssl"; + my $certdir = dirname(__FILE__) . "/../../../test/ssl/ssl"; copy "$certdir/server-cn-only.crt", "$pgdata/server.crt" || die "copying server.crt: $!"; diff --git a/src/test/libpq_encryption/Makefile b/src/test/libpq_encryption/Makefile deleted file mode 100644 index 3ad3da7031..0000000000 --- a/src/test/libpq_encryption/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -#------------------------------------------------------------------------- -# -# Makefile for src/test/libpq_encryption -# -# Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group -# Portions Copyright (c) 1994, Regents of the University of California -# -# src/test/libpq_encryption/Makefile -# -#------------------------------------------------------------------------- - -subdir = src/test/libpq_encryption -top_builddir = ../../.. -include $(top_builddir)/src/Makefile.global - -export with_ssl with_gssapi with_krb_srvnam - -check: - $(prove_check) - -installcheck: - $(prove_installcheck) - -clean distclean: - rm -rf tmp_check diff --git a/src/test/libpq_encryption/README b/src/test/libpq_encryption/README deleted file mode 100644 index 8ceb194527..0000000000 --- a/src/test/libpq_encryption/README +++ /dev/null @@ -1,31 +0,0 @@ -src/test/libpq_encryption/README - -Tests for negotiating network encryption method -=============================================== - -This directory contains a test suite for the libpq options to -negotiate encryption with the server. This requires reconfiguring a -test server, enabling/disabling SSL and GSSAPI, and is therefore kept -separate and not run by default. - -CAUTION: The test server run by this test is configured to listen for TCP -connections on localhost. Any user on the same host is able to log in to the -test server while the tests are running. Do not run this suite on a multi-user -system where you don't trust all local users! Also, this test suite creates a -KDC server that listens for TCP/IP connections on localhost without any real -access control. - -Running the tests -================= - -NOTE: You must have given the --enable-tap-tests argument to configure. - -Run - make check PG_TEST_EXTRA=libpq_encryption - -You can use "make installcheck" if you previously did "make install". -In that case, the code in the installation tree is tested. With -"make check", a temporary installation tree is built from the current -sources and then tested. - -See src/test/perl/README for more info about running these tests. diff --git a/src/test/libpq_encryption/meson.build b/src/test/libpq_encryption/meson.build deleted file mode 100644 index ac1db10d74..0000000000 --- a/src/test/libpq_encryption/meson.build +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2022-2024, PostgreSQL Global Development Group - -tests += { - 'name': 'libpq_encryption', - 'sd': meson.current_source_dir(), - 'bd': meson.current_build_dir(), - 'tap': { - 'tests': [ - 't/001_negotiate_encryption.pl', - ], - 'env': { - 'with_ssl': ssl_library, - 'OPENSSL': openssl.found() ? openssl.path() : '', - 'with_gssapi': gssapi.found() ? 'yes' : 'no', - 'with_krb_srvnam': 'postgres', - }, - }, -} diff --git a/src/test/meson.build b/src/test/meson.build index 702213bc6f..c3d0dfedf1 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -4,7 +4,6 @@ subdir('regress') subdir('isolation') subdir('authentication') -subdir('libpq_encryption') subdir('recovery') subdir('subscription') subdir('modules')