From 8dc6dfb97e13b4cf1652fffd71df938f21fe4f97 Mon Sep 17 00:00:00 2001 From: TheTank20 <57580668+thepwrtank18@users.noreply.github.com> Date: Wed, 9 Jul 2025 20:43:33 +0000 Subject: [PATCH] Downgrade OpenSSL to 1.1.1 (#136) * Update windows-x86-x64.yml * Update windows-arm.yml * Update windows-arm.yml * Update windows-arm.yml * Update windows-arm.yml * Update windows-arm.yml --- .github/workflows/windows-arm.yml | 75 +++++++-------------------- .github/workflows/windows-x86-x64.yml | 26 +++++----- 2 files changed, 33 insertions(+), 68 deletions(-) diff --git a/.github/workflows/windows-arm.yml b/.github/workflows/windows-arm.yml index 2c0a17f..0c74604 100644 --- a/.github/workflows/windows-arm.yml +++ b/.github/workflows/windows-arm.yml @@ -39,7 +39,7 @@ jobs: cmake_arch: ARM sdk_version: '10.0.17763.0' - arch: arm64 - arch_compilename: arm64 + arch_compilename: amd64_arm64 vcpkg_arch: arm64-windows-static cmake_arch: ARM64 sdk_version: '10.0.17763.0' @@ -53,52 +53,18 @@ jobs: - name: Checkout Source Tree uses: actions/checkout@v4 - - name: Setup vcpkg - if: matrix.arch == 'arm64' - shell: pwsh - run: | - git clone https://github.com/Microsoft/vcpkg.git - cd vcpkg - .\bootstrap-vcpkg.bat - echo "VCPKG_ROOT=$env:GITHUB_WORKSPACE/vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Append - echo "VCPKG_DEFAULT_BINARY_CACHE=$env:GITHUB_WORKSPACE/vcpkg/bincache" | Out-File -FilePath $env:GITHUB_ENV -Append - echo "VCPKG_BINARY_SOURCES=clear;default,readwrite" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Cache vcpkg packages - if: matrix.arch == 'arm64' - uses: actions/cache@v4 - with: - path: | - ${{ github.workspace }}/vcpkg/bincache - ${{ github.workspace }}/vcpkg/installed - ${{ github.workspace }}/vcpkg/packages - key: vcpkg-${{ matrix.arch }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cmake') }} - restore-keys: | - vcpkg-${{ matrix.arch }}-${{ hashFiles('**/CMakeLists.txt') }}- - vcpkg-${{ matrix.arch }}- - - name: Cache OpenSSL Binaries - if: matrix.arch == 'arm32' - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: | - ${{ github.workspace }}/openssl-install - key: openssl-${{ matrix.arch }}-${{ hashFiles('**/CMakeLists.txt') }} - restore-keys: | + ${{ github.workspace }}-OpenSSL-MSVC-${{ matrix.arch }} + key: openssl-1.1.1-${{ matrix.arch }}-${{ hashFiles('**/CMakeLists.txt') }} - - name: Install OpenSSL + - name: Checkout and Compile OpenSSL v1.1.1 shell: pwsh run: | - if ("${{ matrix.arch }}" -eq "arm32") { - # For ARM32, build OpenSSL from source - $opensslVersion = "1.1.1w" - $opensslDir = "openssl-src" - - # Download OpenSSL source - Invoke-WebRequest -Uri "https://www.openssl.org/source/openssl-$opensslVersion.tar.gz" -OutFile "openssl.tar.gz" - tar -xf openssl.tar.gz - Rename-Item -Path "openssl-$opensslVersion" -NewName $opensslDir - cd $opensslDir + git clone https://github.com/UMSKT/openssl --branch OpenSSL_1_1_1-stable --depth 1 openssl-src + cd openssl-src # Install Perl if needed choco install strawberryperl -y @@ -109,33 +75,32 @@ jobs: # First set up Visual Studio environment $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath $vcvarsall = Join-Path $vsPath "VC\Auxiliary\Build\vcvarsall.bat" + + $vcTarget = "" + if ("${{ matrix.arch}}" -eq "arm32") { + $vcTarget = "VC-WIN32-ARM" + } else { + $vcTarget = "VC-WIN64-ARM" + } # Configure OpenSSL - perl Configure VC-WIN32-ARM no-shared no-asm no-engine --prefix="$env:GITHUB_WORKSPACE/openssl-install" + perl Configure $vcTarget no-shared no-asm no-engine --prefix="$env:GITHUB_WORKSPACE/OpenSSL-MSVC-${{ matrix.arch }}" # Build using MSVC ARM32 tools - cmd /c "call `"$vcvarsall`" amd64_arm && nmake && nmake install_sw" + cmd /c "call `"$vcvarsall`" ${{matrix.arch_compilename}} && nmake && nmake install_sw" cd .. - } else { - # For ARM64, use vcpkg as before - New-Item -ItemType Directory -Force -Path $env:VCPKG_DEFAULT_BINARY_CACHE - & "$env:VCPKG_ROOT\vcpkg.exe" install openssl:${{ matrix.vcpkg_arch }} --clean-after-build - echo "OPENSSL_ROOT_DIR=$env:VCPKG_ROOT/installed/${{ matrix.vcpkg_arch }}" | Out-File -FilePath $env:GITHUB_ENV -Append - } - + - name: Save OpenSSL Binaries - if: matrix.arch == 'arm32' uses: actions/cache/save@v4 with: path: | - ${{ github.workspace }}/openssl-install - key: openssl-${{ matrix.arch }}-${{ hashFiles('**/CMakeLists.txt') }} + ${{ github.workspace }}/OpenSSL-MSVC-${{ matrix.arch }} + key: openssl-1.1.1-${{ matrix.arch }}-${{ hashFiles('**/CMakeLists.txt') }} - name: Set OpenSSL Environment - if: matrix.arch == 'arm32' shell: pwsh run: | - echo "OPENSSL_ROOT=$env:GITHUB_WORKSPACE/openssl-install" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "OPENSSL_ROOT=$env:GITHUB_WORKSPACE/OpenSSL-MSVC-${{ matrix.arch }}" | Out-File -FilePath $env:GITHUB_ENV -Append echo "OPENSSL_LIBDIR=lib" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Configure UMSKT diff --git a/.github/workflows/windows-x86-x64.yml b/.github/workflows/windows-x86-x64.yml index b9833fe..5ed839f 100644 --- a/.github/workflows/windows-x86-x64.yml +++ b/.github/workflows/windows-x86-x64.yml @@ -53,23 +53,23 @@ jobs: - name: Checkout Source Tree uses: actions/checkout@v4 - - name: Cache OpenSSL 3.1.2 (32-bit) + - name: Cache OpenSSL 1.1.1 (32-bit) uses: actions/cache/restore@v4 if: matrix.arch == 'x86' id: cache-openssl-32 with: path: | ${{ github.workspace }}/OpenSSL-TDM-32 - key: openssl-3.1.2-x86-${{ hashFiles('**/CMakeLists.txt') }} + key: openssl-1.1.1-x86-${{ hashFiles('**/CMakeLists.txt') }} - - name: Cache OpenSSL 3.1.2 (64-bit) + - name: Cache OpenSSL 1.1.1 (64-bit) uses: actions/cache/restore@v4 if: matrix.arch == 'x64' id: cache-openssl-64 with: path: | ${{ github.workspace }}/OpenSSL-TDM-64 - key: openssl-3.1.2-x64-${{ hashFiles('**/CMakeLists.txt') }} + key: openssl-1.1.1-x64-${{ hashFiles('**/CMakeLists.txt') }} - name: Setup MSYS2 if: steps.cache-openssl-32.outputs.cache-hit != 'true' && steps.cache-openssl-64.outputs.cache-hit != 'true' @@ -84,15 +84,15 @@ jobs: perl git - - name: Checkout and Compile OpenSSL 3.1.2 + - name: Checkout and Compile OpenSSL 1.1.1 if: steps.cache-openssl-32.outputs.cache-hit != 'true' && steps.cache-openssl-64.outputs.cache-hit != 'true' shell: msys2 {0} run: | # Clone UMSKT's OpenSSL fork echo "Cloning UMSKT OpenSSL fork..." - git clone https://github.com/UMSKT/openssl.git --depth 1 openssl-3.1.2 + git clone https://github.com/UMSKT/openssl.git --branch OpenSSL_1_1_1-stable --depth 1 openssl-1.1.1 - - name: Checkout and Compile OpenSSL 3.1.2 (32-bit) + - name: Checkout and Compile OpenSSL 1.1.1 (32-bit) if: matrix.arch == 'x86' && steps.cache-openssl-32.outputs.cache-hit != 'true' shell: msys2 {0} run: | @@ -104,7 +104,7 @@ jobs: export PATH="/c/TDM-GCC-64/bin:$PATH" export MSYSTEM=MINGW32 echo "Compiling 32-bit OpenSSL..." - cd openssl-3.1.2 + cd openssl-1.1.1 /usr/bin/perl Configure mingw --prefix=$(cygpath -u "$GITHUB_WORKSPACE")/OpenSSL-TDM-32 --openssldir=$(cygpath -u "$GITHUB_WORKSPACE")/OpenSSL-TDM-32 no-tests no-sse2 no-asm no-threads -DOPENSSL_DEV_NO_ATOMICS -mno-mmx -mno-sse -mno-sse2 -march=i686 -mtune=generic mingw32-make -j mingw32-make install_sw @@ -122,19 +122,19 @@ jobs: export PATH="/c/TDM-GCC-64/bin:$PATH" export MSYSTEM=MINGW64 echo "Compiling 64-bit OpenSSL..." - cd openssl-3.1.2 + cd openssl-1.1.1 /usr/bin/perl Configure mingw64 --prefix=$(cygpath -u "$GITHUB_WORKSPACE")/OpenSSL-TDM-64 --openssldir=$(cygpath -u "$GITHUB_WORKSPACE")/OpenSSL-TDM-64 no-tests no-asm -DOPENSSL_DEV_NO_ATOMICS -mno-mmx mingw32-make -j mingw32-make install_sw cd .. - - name: Save OpenSSL 3.1.2 (32-bit) + - name: Save OpenSSL 1.1.1 (32-bit) if: matrix.arch == 'x86' && steps.cache-openssl-32.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: path: | ${{ github.workspace }}/OpenSSL-TDM-32 - key: openssl-3.1.2-x86-${{ hashFiles('**/CMakeLists.txt') }} + key: openssl-1.1.1-x86-${{ hashFiles('**/CMakeLists.txt') }} - name: Save OpenSSL 3.1.2 (64-bit) if: matrix.arch == 'x64' && steps.cache-openssl-64.outputs.cache-hit != 'true' @@ -142,7 +142,7 @@ jobs: with: path: | ${{ github.workspace }}/OpenSSL-TDM-64 - key: openssl-3.1.2-x64-${{ hashFiles('**/CMakeLists.txt') }} + key: openssl-1.1.1-x64-${{ hashFiles('**/CMakeLists.txt') }} - name: Set OpenSSL Environment (32-bit) if: matrix.arch == 'x86' @@ -196,4 +196,4 @@ jobs: uses: actions/upload-artifact@v4.6.2 with: name: UMSKT-WinNT-${{ matrix.arch }} - path: umskt.exe \ No newline at end of file + path: umskt.exe