]> git.ipfire.org Git - thirdparty/curl.git/commit
genserv.pl: detect `openssl` in `PATH`, omit `command -v`
authorViktor Szakats <commit@vsz.me>
Sat, 29 Mar 2025 13:43:10 +0000 (14:43 +0100)
committerViktor Szakats <commit@vsz.me>
Sun, 30 Mar 2025 21:36:18 +0000 (23:36 +0200)
commit3e2860f66d8fd5a5f0561543c42e68ea948928e6
tree5bcc58fab0057fe37f508bdfd07f8adcef5597dc
parent8579cf4016f4f6003761f6bae69f346bbbdcdd40
genserv.pl: detect `openssl` in `PATH`, omit `command -v`

Before this patch the script relied on Perl `system()` finding `openssl`
in `PATH`, plus tried to display the full path of `openssl` by using
`command -v` (or `which` on Windows). `command -v` did not work in CI
for unknown reasons. To resolve it, this patch detects `openssl` in
`PATH` manually, displays the detected full path and calls `openssl`
with the detected full path, and stops relying on `system` for this.

It also follows how `sshhelp.pm` is detecting executables. Though this
patch uses Perl `-f` instead of `-e && -d` used there .

Silencing this in CI logs:
```
Can't exec "command": No such file or directory at ../../../tests/certs/genserv.pl line 51.
```
Ref: https://github.com/curl/curl/actions/runs/14145795884/job/39632942668?pr=16865#step:39:108

Closes #16868
tests/certs/genserv.pl