]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Avoid chicken and egg problem with reg setting
authorNeil Horman <nhorman@openssl.org>
Fri, 28 Jun 2024 17:28:55 +0000 (13:28 -0400)
committerNeil Horman <nhorman@openssl.org>
Tue, 9 Jul 2024 08:01:44 +0000 (04:01 -0400)
Because openssl with -DOSSL_WINCTX no longer falls back to build time
defines, we have a chicken and egg problem.  CI needs to query openssl
for its version string so registry keys can be set properly, but openssl
version refuses to run because no configuration file can be found

So we work around it by, for the purposes of setting the registry keys,
we set OPENSSL_CONF to a know config file, so that openssl version runs
properly.

Once the version is extracted, we can set the registry keys, and openssl
will function properly without OPENSSL_CONF set

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24450)

.github/workflows/windows.yml
.github/workflows/windows_comp.yml

index 110ac4bed9480e2faa00d08dbacb044616066d68..a0cb656e36c3f7b9b50ab139d0e3a62ad3f31cbd 100644 (file)
@@ -54,6 +54,7 @@ jobs:
     - name: Gather openssl version info
       working-directory: _build
       run: |
+        $Env:OPENSSL_CONF="apps\openssl.cnf"
         apps/openssl.exe version -v
         apps/openssl.exe version -v | awk '{print $2}'
         apps/openssl.exe version -v | awk '{print $2}' | sed -e's/\([0-9]\+\.[0-9]\+\)\(\.[0-9]\+\)\(-*.*$\)/\1/'
index fcdf7905a42eda46b9957602f85960923bab7dab..a65a6b5244d5fe9508e3c7c2a5b228810fa2de8a 100644 (file)
@@ -36,9 +36,10 @@ jobs:
     - name: Gather openssl version info
       working-directory: _build
       run: |
+        $Env:OPENSSL_CONF="apps\openssl.cnf"
         apps/openssl.exe version -v
         apps/openssl.exe version -v | awk '{print $2}'
-        apps/openssl.exe version -v | awk '{print $2}' | sed -e's/\([0-9]\+\.[0-9]\+\)\(\.[0-9]\+\)\(-*.*$\)/\1/ 
+        apps/openssl.exe version -v | awk '{print $2}' | sed -e's/\([0-9]\+\.[0-9]\+\)\(\.[0-9]\+\)\(-*.*$\)/\1/'
         echo "OSSL_VERSION=$(apps/openssl.exe version -v | awk '{print $2}' | sed -e's/\([0-9]\+\.[0-9]\+\)\(\.[0-9]\+\)\(-*.*$\)/\1/')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
     - name: Set registry keys
       working-directory: _build