copy and bundle openssl items directly from runner

This commit is contained in:
Danglewood
2025-10-17 10:23:30 -07:00
parent 391274d8f4
commit 432c63bda0
15 changed files with 142 additions and 4 deletions

View File

@@ -40,6 +40,46 @@ jobs:
- name: Install OpenSSL
run: brew install openssl
- name: Copy and Sign SSL dylibs
run: |
mkdir -p src-tauri/frameworks
OPENSSL_PREFIX=$(brew --prefix openssl@3)
# Verify files exist before copying
if [ ! -f "${OPENSSL_PREFIX}/lib/libcrypto.3.dylib" ]; then
echo "Error: libcrypto.3.dylib not found at ${OPENSSL_PREFIX}/lib/"
exit 1
fi
if [ ! -f "${OPENSSL_PREFIX}/lib/libssl.3.dylib" ]; then
echo "Error: libssl.3.dylib not found at ${OPENSSL_PREFIX}/lib/"
exit 1
fi
cp "${OPENSSL_PREFIX}/lib/libcrypto.3.dylib" src-tauri/frameworks/
cp "${OPENSSL_PREFIX}/lib/libssl.3.dylib" src-tauri/frameworks/
security find-identity -v -p codesigning
codesign --force --sign "Developer ID Application" \
--timestamp \
--options runtime \
src-tauri/frameworks/libcrypto.3.dylib
codesign --force --sign "Developer ID Application" \
--timestamp \
--options runtime \
src-tauri/frameworks/libssl.3.dylib
# Verify signatures
codesign --verify --verbose=4 --deep --strict src-tauri/frameworks/libcrypto.3.dylib
codesign --verify --verbose=4 --deep --strict src-tauri/frameworks/libssl.3.dylib
# Display signature info
codesign -dvv src-tauri/frameworks/libcrypto.3.dylib
codesign -dvv src-tauri/frameworks/libssl.3.dylib
echo "Successfully copied and signed SSL dylibs"
- name: Setup Cargo Cache
uses: actions/cache@v4
with:

View File

@@ -40,6 +40,45 @@ jobs:
- name: Install OpenSSL
run: brew install openssl
- name: Copy and Sign SSL dylibs
run: |
mkdir -p src-tauri/frameworks
OPENSSL_PREFIX=$(brew --prefix openssl@3)
# Verify files exist before copying
if [ ! -f "${OPENSSL_PREFIX}/lib/libcrypto.3.dylib" ]; then
echo "Error: libcrypto.3.dylib not found at ${OPENSSL_PREFIX}/lib/"
exit 1
fi
if [ ! -f "${OPENSSL_PREFIX}/lib/libssl.3.dylib" ]; then
echo "Error: libssl.3.dylib not found at ${OPENSSL_PREFIX}/lib/"
exit 1
fi
cp "${OPENSSL_PREFIX}/lib/libcrypto.3.dylib" src-tauri/frameworks/
cp "${OPENSSL_PREFIX}/lib/libssl.3.dylib" src-tauri/frameworks/
security find-identity -v -p codesigning
codesign --force --sign "Developer ID Application" \
--timestamp \
--options runtime \
src-tauri/frameworks/libcrypto.3.dylib
codesign --force --sign "Developer ID Application" \
--timestamp \
--options runtime \
src-tauri/frameworks/libssl.3.dylib
# Verify signatures
codesign --verify --verbose=4 --deep --strict src-tauri/frameworks/libcrypto.3.dylib
codesign --verify --verbose=4 --deep --strict src-tauri/frameworks/libssl.3.dylib
# Display signature info
codesign -dvv src-tauri/frameworks/libcrypto.3.dylib
codesign -dvv src-tauri/frameworks/libssl.3.dylib
echo "Successfully copied and signed SSL dylibs"
- name: Setup Cargo Cache
uses: actions/cache@v4
with:

View File

@@ -58,6 +58,65 @@ jobs:
echo "OPENSSL_INCLUDE_DIR=${{ env.VCPKG_ROOT }}/installed/x64-windows-static/include" >> $GITHUB_ENV
echo "OPENSSL_LIB_DIR=${{ env.VCPKG_ROOT }}/installed/x64-windows-static/lib" >> $GITHUB_ENV
- name: Copy SSL DLLs
shell: pwsh
run: |
# Verify OpenSSL DLLs exist
$opensslBinDir = "${{ env.VCPKG_ROOT }}/installed/x64-windows-static/bin"
$libcryptoPath = Join-Path $opensslBinDir "libcrypto-3-x64.dll"
$libsslPath = Join-Path $opensslBinDir "libssl-3-x64.dll"
if (-not (Test-Path $libcryptoPath)) {
Write-Error "Error: libcrypto-3-x64.dll not found at $libcryptoPath"
exit 1
}
if (-not (Test-Path $libsslPath)) {
Write-Error "Error: libssl-3-x64.dll not found at $libsslPath"
exit 1
}
# Copy DLLs to src-tauri folder
Copy-Item -Path $libcryptoPath -Destination "src-tauri/" -Force
Copy-Item -Path $libsslPath -Destination "src-tauri/" -Force
Write-Host "Successfully copied OpenSSL DLLs to src-tauri/"
Get-ChildItem -Path "src-tauri/"
- name: Create temp directory for signing DLLs
shell: pwsh
run: New-Item -ItemType Directory -Force -Path "${{ github.workspace }}/desktop/temp-sign-dlls"
- name: Sign libcrypto DLL
uses: sslcom/esigner-codesign@develop
with:
command: sign
username: ${{ secrets.ESIGNER_USERNAME }}
password: ${{ secrets.ESIGNER_PASSWORD }}
credential_id: ${{ secrets.ESIGNER_CREDENTIAL_ID }}
totp_secret: ${{ secrets.ESIGNER_TOTP_SECRET }}
file_path: ${{ github.workspace }}/desktop/src-tauri/libcrypto-3-x64.dll
output_path: ${{ github.workspace }}/desktop/temp-sign-dlls
malware_block: false
- name: Sign libssl DLL
uses: sslcom/esigner-codesign@develop
with:
command: sign
username: ${{ secrets.ESIGNER_USERNAME }}
password: ${{ secrets.ESIGNER_PASSWORD }}
credential_id: ${{ secrets.ESIGNER_CREDENTIAL_ID }}
totp_secret: ${{ secrets.ESIGNER_TOTP_SECRET }}
file_path: ${{ github.workspace }}/desktop/src-tauri/libssl-3-x64.dll
output_path: ${{ github.workspace }}/desktop/temp-sign-dlls
malware_block: false
- name: Replace unsigned DLLs with signed ones
shell: pwsh
run: |
Copy-Item -Path "${{ github.workspace }}/desktop/temp-sign-dlls/libcrypto-3-x64.dll" -Destination "${{ github.workspace }}/desktop/src-tauri/libcrypto-3-x64.dll" -Force
Copy-Item -Path "${{ github.workspace }}/desktop/temp-sign-dlls/libssl-3-x64.dll" -Destination "${{ github.workspace }}/desktop/src-tauri/libssl-3-x64.dll" -Force
Write-Host "Successfully replaced unsigned DLLs with signed versions"
Get-ChildItem -Path "${{ github.workspace }}/desktop/src-tauri/*.dll"
- name: Set up Node.js
uses: actions/setup-node@v4
with: