postgresql/src/test/libpq_encryption
Heikki Linnakangas 0a5f229189 Fix libpq_encryption tests when compiled without SSL support
It correctly skipped tests involving SSL in the server when SSL
support was not compiled in, but even when SSL is not enabled in the
server and the connection is established without SSL, libpq behaves
differently in many of the test scenarios when libpq is compiled
without SSL support. For example, with sslmode=prefer, if libpq is
compiled with SSL support it will attempt to use SSL, but without SSL
support it will try authenticating in plaintext mode directly. The
expected test output didn't take that into account.

Discussion: https://www.postgresql.org/message-id/CA%2BhUKG%2BHRTtB%2Bx%2BKKKj_cfX6sNhbeGuqmGxjGMwdVPG7YGFP8w@mail.gmail.com
2024-04-12 19:52:28 +03:00
..
t Fix libpq_encryption tests when compiled without SSL support 2024-04-12 19:52:28 +03:00
Makefile Add tests for libpq gssencmode and sslmode options 2024-04-08 02:49:32 +03:00
README Add tests for libpq gssencmode and sslmode options 2024-04-08 02:49:32 +03:00
meson.build Add tests for libpq gssencmode and sslmode options 2024-04-08 02:49:32 +03:00

README

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.