summaryrefslogtreecommitdiff
path: root/src/test/modules
diff options
context:
space:
mode:
authorPeter Eisentraut2022-10-20 19:01:05 +0000
committerPeter Eisentraut2022-10-20 19:05:42 +0000
commitc8e4030d1bddc1120fd1c3f17db5b86a729df4b6 (patch)
tree946b80115691fd827a0fc06a7d5c85bfe8a88c1c /src/test/modules
parent40c7fcbbed5d922e905f8032c5035826d0406980 (diff)
Make finding openssl program a configure or meson option
Various test suites use the "openssl" program as part of their setup. There isn't a way to override which openssl program is to be used, other than by fiddling with the path, perhaps. This has gotten increasingly problematic because different versions of openssl have different capabilities and do different things by default. This patch checks for an openssl binary in configure and meson setup, with appropriate ways to override it. This is similar to how "lz4" and "zstd" are handled, for example. The meson build system actually already did this, but the result was only used in some places. This is now applied more uniformly. Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/dc638b75-a16a-007d-9e1c-d16ed6cf0ad2%40enterprisedb.com
Diffstat (limited to 'src/test/modules')
-rw-r--r--src/test/modules/ssl_passphrase_callback/Makefile4
-rw-r--r--src/test/modules/ssl_passphrase_callback/meson.build2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/test/modules/ssl_passphrase_callback/Makefile b/src/test/modules/ssl_passphrase_callback/Makefile
index a34d7ea46a..922f0ee078 100644
--- a/src/test/modules/ssl_passphrase_callback/Makefile
+++ b/src/test/modules/ssl_passphrase_callback/Makefile
@@ -31,9 +31,9 @@ PASS = FooBaR1
.PHONY: ssl-files ssl-files-clean
ssl-files:
- openssl req -new -x509 -days 10000 -nodes -out server.crt \
+ $(OPENSSL) req -new -x509 -days 10000 -nodes -out server.crt \
-keyout server.ckey -subj "/CN=localhost"
- openssl rsa -aes256 -in server.ckey -out server.key -passout pass:$(PASS)
+ $(OPENSSL) rsa -aes256 -in server.ckey -out server.key -passout pass:$(PASS)
rm server.ckey
ssl-files-clean:
diff --git a/src/test/modules/ssl_passphrase_callback/meson.build b/src/test/modules/ssl_passphrase_callback/meson.build
index a9eb4c564d..1c9f009af3 100644
--- a/src/test/modules/ssl_passphrase_callback/meson.build
+++ b/src/test/modules/ssl_passphrase_callback/meson.build
@@ -25,8 +25,6 @@ testprep_targets += ssl_passphrase_callback
# Targets to generate or remove the ssl certificate and key. Need to be copied
# to the source afterwards. Normally not needed.
-openssl = find_program('openssl', native: true, required: false)
-
if openssl.found()
cert = custom_target('server.crt',
output: ['server.crt', 'server.ckey'],