]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Avoid warnings in tests when openssl binary isn't available
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 17 Oct 2025 12:21:26 +0000 (14:21 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 17 Oct 2025 12:21:26 +0000 (14:21 +0200)
commitf01c4eb4e901522859367ddfef69098224b36321
tree0c0bc8a16c1f03f36ac615b66bb2bca217787176
parent61b5fa029a432e6c5f516c633b5467d4cc55f264
Avoid warnings in tests when openssl binary isn't available

The SSL tests for pg_stat_ssl tries to exactly match the serial
from the certificate by extracting it with the openssl binary.
If that fails due to the binary not being available, a fallback
match is used, but the attempt to execute a missing binary adds
a warning to the output which can confuse readers for a failure
in the test.  Fix by only attempting if the openssl binary was
found by autoconf/meson.

Backpatch down to v16 where commit c8e4030d1bdd made the test
use the OPENSSL variable from autoconf/meson instead of a hard-
coded value.

Author: Daniel Gustafsson <daniel@yesql.se>
Reported-by: Christoph Berg <myon@debian.org>
Discussion: https://postgr.es/m/aNPSp1-RIAs3skZm@msg.df7cb.de
Backpatch-through: 16
src/test/ssl/t/001_ssltests.pl