Commit 357ec54969 for openssl.org

commit 357ec54969157ba57a2e43982dfe3a1b04f3a7eb
Author: Dmitry Misharov <dmitry@openssl.org>
Date:   Tue Nov 24 09:36:22 2026 +0100

    .github: move Windows jom, nasm and coreinfo steps into composite actions

    Forks dispatching os-zoo.yml now download jom and nasm from upstream
    instead of the openssl-library.org mirror, as the other workflows do.

    Assisted-by: Claude:claude-fable-5-2
    Reviewed-by: Andrew Dinh <andrewd@openssl.org>
    Reviewed-by: Milan Broz <gmazyland@gmail.com>
    Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
    Merge-date: Wed Nov 25 20:35:30 2026
    Merged-from: https://github.com/openssl/openssl/pull/33945

diff --git a/.github/actions/install-jom/action.yml b/.github/actions/install-jom/action.yml
new file mode 100644
index 0000000000..d1f2ca6153
--- /dev/null
+++ b/.github/actions/install-jom/action.yml
@@ -0,0 +1,32 @@
+# Copyright 2026 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (the "License").  You may not use
+# this file except in compliance with the License.  You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+name: install jom
+description: Install jom on a Windows runner and add it to PATH
+
+runs:
+  using: composite
+  steps:
+  # openssl/openssl uses its own mirror; the checksum is in .github/ci-deps.json
+  - name: install jom
+    if: github.repository == 'openssl/openssl'
+    shell: pwsh
+    run: |
+      mkdir C:\jom
+      Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe -MaximumRetryCount 3 -RetryIntervalSec 30
+      $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
+      $actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
+      if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
+      "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+  - name: install jom (forks)
+    if: github.repository != 'openssl/openssl'
+    shell: pwsh
+    run: |
+      mkdir C:\jom
+      Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom_1_1_7.zip" -OutFile C:\jom\jom.zip
+      Expand-Archive -Path C:\jom\jom.zip -DestinationPath C:\jom
+      "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
diff --git a/.github/actions/install-nasm/action.yml b/.github/actions/install-nasm/action.yml
new file mode 100644
index 0000000000..b480791811
--- /dev/null
+++ b/.github/actions/install-nasm/action.yml
@@ -0,0 +1,38 @@
+# Copyright 2026 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (the "License").  You may not use
+# this file except in compliance with the License.  You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+name: install nasm
+description: Install NASM on a Windows runner and add it to PATH
+
+inputs:
+  arch:
+    description: NASM installer architecture, x64 or x86
+    default: x64
+
+runs:
+  using: composite
+  steps:
+  # openssl/openssl uses its own mirror; the checksum is in .github/ci-deps.json
+  - name: install nasm
+    if: github.repository == 'openssl/openssl'
+    shell: pwsh
+    run: |
+      $installer = "nasm-3.01-installer-${{ inputs.arch == 'x86' && 'x86' || 'x64' }}.exe"
+      Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/$installer" -OutFile $installer -MaximumRetryCount 3 -RetryIntervalSec 30
+      $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).$installer
+      $actual = (Get-FileHash $installer -Algorithm SHA256).Hash
+      if ($actual -ne $expected) { throw "SHA256 mismatch for $installer (expected $expected, got $actual)" }
+      Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
+      "C:\Program Files${{ inputs.arch == 'x86' && ' (x86)' || '' }}\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+  - name: install nasm (forks)
+    if: github.repository != 'openssl/openssl'
+    shell: pwsh
+    run: |
+      $installer = "nasm-3.01-installer-${{ inputs.arch == 'x86' && 'x86' || 'x64' }}.exe"
+      Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/3.01/win${{ inputs.arch == 'x86' && '32' || '64' }}/$installer" -OutFile $installer
+      Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
+      "C:\Program Files${{ inputs.arch == 'x86' && ' (x86)' || '' }}\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
diff --git a/.github/actions/windows-cpu-info/action.yml b/.github/actions/windows-cpu-info/action.yml
new file mode 100644
index 0000000000..e182266bc7
--- /dev/null
+++ b/.github/actions/windows-cpu-info/action.yml
@@ -0,0 +1,25 @@
+# Copyright 2026 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (the "License").  You may not use
+# this file except in compliance with the License.  You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+name: get cpu info
+description: Print Coreinfo output and the CPU features OpenSSL detects in _build
+
+runs:
+  using: composite
+  steps:
+  - name: download coreinfo
+    shell: pwsh
+    run: |
+      mkdir _build\coreinfo
+      Invoke-WebRequest -Uri "https://download.sysinternals.com/files/Coreinfo.zip" -outfile "_build\coreinfo\Coreinfo.zip" -MaximumRetryCount 3 -RetryIntervalSec 30
+  - name: get cpu info
+    working-directory: _build
+    shell: pwsh
+    run: |
+      7z.exe x coreinfo/Coreinfo.zip
+      ./Coreinfo64.exe -accepteula -f
+      ./apps/openssl.exe version -c
diff --git a/.github/workflows/avx512-sde.yml b/.github/workflows/avx512-sde.yml
index 0689cd8bb8..603856b47a 100644
--- a/.github/workflows/avx512-sde.yml
+++ b/.github/workflows/avx512-sde.yml
@@ -126,39 +126,10 @@ jobs:
           ref: ${{ github.event.inputs.head_sha || github.sha }}

       - name: install nasm
-        if: github.repository == 'openssl/openssl'
-        run: |
-          $installer = "nasm-3.01-installer-x64.exe"
-          Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/$installer" -OutFile $installer -MaximumRetryCount 3 -RetryIntervalSec 30
-          $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).$installer
-          $actual = (Get-FileHash $installer -Algorithm SHA256).Hash
-          if ($actual -ne $expected) { throw "SHA256 mismatch for $installer (expected $expected, got $actual)" }
-          Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-          "C:\Program Files\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-      - name: install nasm (forks)
-        if: github.repository != 'openssl/openssl'
-        run: |
-          $installer = "nasm-3.01-installer-x64.exe"
-          Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/3.01/win64/$installer" -OutFile $installer
-          Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-          "C:\Program Files\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+        uses: ./.github/actions/install-nasm

       - name: install jom
-        if: github.repository == 'openssl/openssl'
-        run: |
-          mkdir C:\jom
-          Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe -MaximumRetryCount 3 -RetryIntervalSec 30
-          $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
-          $actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
-          if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
-          "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-      - name: install jom (forks)
-        if: github.repository != 'openssl/openssl'
-        run: |
-          mkdir C:\jom
-          Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom_1_1_7.zip" -OutFile C:\jom\jom.zip
-          Expand-Archive -Path C:\jom\jom.zip -DestinationPath C:\jom
-          "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+        uses: ./.github/actions/install-jom

       - name: install Intel SDE
         run: |
diff --git a/.github/workflows/os-zoo.yml b/.github/workflows/os-zoo.yml
index dbfa9c0bd6..e2f4c76ed9 100644
--- a/.github/workflows/os-zoo.yml
+++ b/.github/workflows/os-zoo.yml
@@ -220,22 +220,9 @@ jobs:
     - name: checkout fuzz/corpora submodule
       run: git submodule update --init --depth 1 fuzz/corpora
     - name: install nasm
-      run: |
-        $installer = "nasm-3.01-installer-x64.exe"
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/$installer" -OutFile $installer -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).$installer
-        $actual = (Get-FileHash $installer -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for $installer (expected $expected, got $actual)" }
-        Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-        "C:\Program Files\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-nasm
     - name: install jom
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
-        $actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-jom
     - name: prepare the build directory
       run: mkdir _build
     - name: config
@@ -251,16 +238,8 @@ jobs:
       run: |
         call "${{ matrix.platform.vcvars }}"
         jom /j4 /S
-    - name: download coreinfo
-      run: |
-        mkdir _build\coreinfo
-        Invoke-WebRequest -Uri "https://download.sysinternals.com/files/Coreinfo.zip" -outfile "_build\coreinfo\Coreinfo.zip" -MaximumRetryCount 3 -RetryIntervalSec 30
     - name: get cpu info
-      working-directory: _build
-      run: |
-        7z.exe x coreinfo/Coreinfo.zip
-        ./Coreinfo64.exe -accepteula -f
-        apps/openssl.exe version -c
+      uses: ./.github/actions/windows-cpu-info
     - name: test
       working-directory: _build
       shell: cmd
@@ -284,13 +263,7 @@ jobs:
     # no nasm: VC-WIN64-ARM has no asm_arch, so Configure disables asm
     # here jom is an x86/x64 binary and Windows 11 on ARM runs it under emulation
     - name: install jom
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
-        $actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-jom
     - name: prepare the build directory
       run: mkdir _build
     - name: config
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 8f76fe9961..ca468fec64 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -57,38 +57,11 @@ jobs:
     - name: checkout fuzz/corpora submodule
       run: git submodule update --init --depth 1 fuzz/corpora
     - name: install nasm
-      if: github.repository == 'openssl/openssl'
-      run: |
-        $installer = "nasm-3.01-installer-${{ matrix.platform.arch == 'x86' && 'x86' || 'x64' }}.exe"
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/$installer" -OutFile $installer -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).$installer
-        $actual = (Get-FileHash $installer -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for $installer (expected $expected, got $actual)" }
-        Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-        "C:\Program Files${{ matrix.platform.arch == 'x86' && ' (x86)' || '' }}\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-    - name: install nasm (forks)
-      if: github.repository != 'openssl/openssl'
-      run: |
-        $installer = "nasm-3.01-installer-${{ matrix.platform.arch == 'x86' && 'x86' || 'x64' }}.exe"
-        Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/3.01/win${{ matrix.platform.arch == 'x86' && '32' || '64' }}/$installer" -OutFile $installer
-        Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-        "C:\Program Files${{ matrix.platform.arch == 'x86' && ' (x86)' || '' }}\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-nasm
+      with:
+        arch: ${{ matrix.platform.arch == 'x86' && 'x86' || 'x64' }}
     - name: install jom
-      if: github.repository == 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
-        $actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-    - name: install jom (forks)
-      if: github.repository != 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom_1_1_7.zip" -OutFile C:\jom\jom.zip
-        Expand-Archive -Path C:\jom\jom.zip -DestinationPath C:\jom
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-jom
     - name: prepare the build directory
       run: mkdir _build
     - name: config
@@ -104,10 +77,6 @@ jobs:
       run: |
         call "${{ matrix.platform.vcvars }}"
         jom /j4 /S
-    - name: download coreinfo
-      run: |
-        mkdir _build\coreinfo
-        Invoke-WebRequest -Uri "https://download.sysinternals.com/files/Coreinfo.zip" -outfile "_build\coreinfo\Coreinfo.zip" -MaximumRetryCount 3 -RetryIntervalSec 30
     - name: Gather openssl version info
       working-directory: _build
       run: |
@@ -124,12 +93,8 @@ jobs:
         reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v MODULESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
         reg.exe query HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /reg:32
     - name: get cpu info
-      working-directory: _build
       continue-on-error: true
-      run: |
-        7z.exe x coreinfo/Coreinfo.zip
-        ./Coreinfo64.exe -accepteula -f
-        ./apps/openssl.exe version -c
+      uses: ./.github/actions/windows-cpu-info
     - name: Check platform symbol usage
       working-directory: _build
       shell: cmd
@@ -163,21 +128,7 @@ jobs:
     - name: prepare the build directory
       run: mkdir _build
     - name: install jom
-      if: github.repository == 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
-        $actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-    - name: install jom (forks)
-      if: github.repository != 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom_1_1_7.zip" -OutFile C:\jom\jom.zip
-        Expand-Archive -Path C:\jom\jom.zip -DestinationPath C:\jom
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-jom
     - name: config
       working-directory: _build
       shell: cmd
@@ -191,17 +142,9 @@ jobs:
       run: |
         call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
         jom /j4 /S
-    - name: download coreinfo
-      run: |
-        mkdir _build\coreinfo
-        Invoke-WebRequest -Uri "https://download.sysinternals.com/files/Coreinfo.zip" -outfile "_build\coreinfo\Coreinfo.zip" -MaximumRetryCount 3 -RetryIntervalSec 30
     - name: get cpu info
-      working-directory: _build
       continue-on-error: true
-      run: |
-        7z.exe x coreinfo/Coreinfo.zip
-        ./Coreinfo64.exe -accepteula -f
-        ./apps/openssl.exe version -c
+      uses: ./.github/actions/windows-cpu-info
     - name: test
       working-directory: _build
       shell: cmd
@@ -218,21 +161,7 @@ jobs:
     - name: checkout fuzz/corpora submodule
       run: git submodule update --init --depth 1 fuzz/corpora
     - name: install jom
-      if: github.repository == 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
-        $actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-    - name: install jom (forks)
-      if: github.repository != 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom_1_1_7.zip" -OutFile C:\jom\jom.zip
-        Expand-Archive -Path C:\jom\jom.zip -DestinationPath C:\jom
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-jom
     - name: install cmocka and detours via vcpkg
       shell: pwsh
       run: |
@@ -273,21 +202,7 @@ jobs:
     - name: prepare the build directory
       run: mkdir _build
     - name: install jom
-      if: github.repository == 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
-        $actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-    - name: install jom (forks)
-      if: github.repository != 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom_1_1_7.zip" -OutFile C:\jom\jom.zip
-        Expand-Archive -Path C:\jom\jom.zip -DestinationPath C:\jom
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-jom
     - name: config
       working-directory: _build
       shell: cmd
@@ -301,17 +216,9 @@ jobs:
       run: |
         call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
         jom /j4 /S
-    - name: download coreinfo
-      run: |
-        mkdir _build\coreinfo
-        Invoke-WebRequest -Uri "https://download.sysinternals.com/files/Coreinfo.zip" -outfile "_build\coreinfo\Coreinfo.zip" -MaximumRetryCount 3 -RetryIntervalSec 30
     - name: get cpu info
-      working-directory: _build
       continue-on-error: true
-      run: |
-        7z.exe x coreinfo/Coreinfo.zip
-        ./Coreinfo64.exe -accepteula -f
-        ./apps/openssl.exe version -c
+      uses: ./.github/actions/windows-cpu-info
     - name: test
       working-directory: _build
       shell: cmd
@@ -332,22 +239,7 @@ jobs:
       with:
         persist-credentials: false
     - name: install nasm
-      if: github.repository == 'openssl/openssl'
-      run: |
-        $installer = "nasm-3.01-installer-x64.exe"
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/$installer" -OutFile $installer -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).$installer
-        $actual = (Get-FileHash $installer -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for $installer (expected $expected, got $actual)" }
-        Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-        "C:\Program Files\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-    - name: install nasm (forks)
-      if: github.repository != 'openssl/openssl'
-      run: |
-        $installer = "nasm-3.01-installer-x64.exe"
-        Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/3.01/win64/$installer" -OutFile $installer
-        Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-        "C:\Program Files\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-nasm
     - name: config
       shell: cmd
       run: |
diff --git a/.github/workflows/windows_comp.yml b/.github/workflows/windows_comp.yml
index 4f938c9dd4..62b2a55915 100644
--- a/.github/workflows/windows_comp.yml
+++ b/.github/workflows/windows_comp.yml
@@ -12,6 +12,7 @@ on:
     paths:
       - 'crypto/comp/*.c'
       - '.github/workflows/windows_comp.yml'
+      - '.github/actions/**'
   push:
     paths:
       - '**.c'
@@ -29,38 +30,9 @@ jobs:
     - name: checkout fuzz/corpora submodule
       run: git submodule update --init --depth 1 fuzz/corpora
     - name: install nasm
-      if: github.repository == 'openssl/openssl'
-      run: |
-        $installer = "nasm-3.01-installer-x64.exe"
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/$installer" -OutFile $installer -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).$installer
-        $actual = (Get-FileHash $installer -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for $installer (expected $expected, got $actual)" }
-        Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-        "C:\Program Files\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-    - name: install nasm (forks)
-      if: github.repository != 'openssl/openssl'
-      run: |
-        $installer = "nasm-3.01-installer-x64.exe"
-        Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/3.01/win64/$installer" -OutFile $installer
-        Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-        "C:\Program Files\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-nasm
     - name: install jom
-      if: github.repository == 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
-        $actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-    - name: install jom (forks)
-      if: github.repository != 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom_1_1_7.zip" -OutFile C:\jom\jom.zip
-        Expand-Archive -Path C:\jom\jom.zip -DestinationPath C:\jom
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-jom
     - name: prepare the build directory
       run: mkdir _build
     - name: Get zstd
@@ -94,17 +66,9 @@ jobs:
         reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
         reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v MODULESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
         reg.exe query HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /reg:32
-    - name: download coreinfo
-      run: |
-        mkdir _build\coreinfo
-        Invoke-WebRequest -Uri "https://download.sysinternals.com/files/Coreinfo.zip" -outfile "_build\coreinfo\Coreinfo.zip" -MaximumRetryCount 3 -RetryIntervalSec 30
     - name: get cpu info
-      working-directory: _build
       continue-on-error: true
-      run: |
-        7z.exe x coreinfo/Coreinfo.zip
-        ./Coreinfo64.exe -accepteula -f
-        ./apps/openssl.exe version -c
+      uses: ./.github/actions/windows-cpu-info
     - name: test
       working-directory: _build
       shell: cmd
@@ -121,38 +85,9 @@ jobs:
     - name: checkout fuzz/corpora submodule
       run: git submodule update --init --depth 1 fuzz/corpora
     - name: install nasm
-      if: github.repository == 'openssl/openssl'
-      run: |
-        $installer = "nasm-3.01-installer-x64.exe"
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/$installer" -OutFile $installer -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).$installer
-        $actual = (Get-FileHash $installer -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for $installer (expected $expected, got $actual)" }
-        Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-        "C:\Program Files\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-    - name: install nasm (forks)
-      if: github.repository != 'openssl/openssl'
-      run: |
-        $installer = "nasm-3.01-installer-x64.exe"
-        Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/3.01/win64/$installer" -OutFile $installer
-        Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
-        "C:\Program Files\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-nasm
     - name: install jom
-      if: github.repository == 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe -MaximumRetryCount 3 -RetryIntervalSec 30
-        $expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
-        $actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
-        if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
-    - name: install jom (forks)
-      if: github.repository != 'openssl/openssl'
-      run: |
-        mkdir C:\jom
-        Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom_1_1_7.zip" -OutFile C:\jom\jom.zip
-        Expand-Archive -Path C:\jom\jom.zip -DestinationPath C:\jom
-        "C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append
+      uses: ./.github/actions/install-jom
     - name: prepare the build directory
       run: mkdir _build
     - name: Get brotli
@@ -186,17 +121,9 @@ jobs:
         reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
         reg.exe add HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v MODULESDIR /t REG_EXPAND_SZ /d TESTOPENSSLDIR /reg:32
         reg.exe query HKLM\SOFTWARE\OpenSSL-${Env:OSSL_VERSION}-openssl /v OPENSSLDIR /reg:32
-    - name: download coreinfo
-      run: |
-        mkdir _build\coreinfo
-        Invoke-WebRequest -Uri "https://download.sysinternals.com/files/Coreinfo.zip" -outfile "_build\coreinfo\Coreinfo.zip" -MaximumRetryCount 3 -RetryIntervalSec 30
     - name: get cpu info
-      working-directory: _build
       continue-on-error: true
-      run: |
-        7z.exe x coreinfo/Coreinfo.zip
-        ./Coreinfo64.exe -accepteula -f
-        ./apps/openssl.exe version -c
+      uses: ./.github/actions/windows-cpu-info
     - name: test
       working-directory: _build
       shell: cmd