Repository navigation
Keep the macOS OpenSSL search paths out of /tmp - #528
Merged
Merged
Conversation
OpenSSL compiles its installation prefix in as the directory it searches for engines and providers loaded by name. The macOS release job installed OpenSSL with --prefix=/tmp/opensslinstall, so the binary would look for, say, "-engine pkcs11" in /tmp/opensslinstall, which any local user can create. Keep OpenSSL's default /usr/local prefix and stage the installation with DESTDIR, as the Windows job does with its default prefix. Fail the build if the binary refers to the staging directory. The cache key changes because the installed layout does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
OpenSSL compiles its installation prefix in as the directory it searches for engines and providers loaded by name. Since #523, the macOS release job installs OpenSSL with
--prefix=/tmp/opensslinstall. The resulting binary would therefore look for-engine pkcs11, for example, in/tmp/opensslinstall/lib/engines-3, a directory any local user can create. No release has shipped with this yet.Fix
Keep OpenSSL's default
/usr/localprefix and stage the installation withDESTDIR, as #527 does on Windows with that platform's default prefix. The build now fails if the binary refers to the staging directory. The cache key changes because the installed layout does.Validation
I ran the macOS jobs via
workflow_dispatchfrom a temporary branch (42083460974). Both binaries now embedENGINESDIR: "/usr/local/lib/engines-3"andMODULESDIR: "/usr/local/lib/ossl-modules", where the build from #523 had/tmp/opensslinstall/.... All 391 tests passed on both architectures.