Fix libpq_encryption tests when compiled without SSL support
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 12 Apr 2024 16:52:28 +0000 (19:52 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 12 Apr 2024 16:52:28 +0000 (19:52 +0300)
commit0a5f2291891ffca96ccd3ef29c9c1541a9277970
treea637e487ee71a02ecd1949b4c58923d35373b729
parent929c05774b512bdf7ea4a5912fa2f4d63fc90712
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
src/test/libpq_encryption/t/001_negotiate_encryption.pl