From d84bc0f1bdc2e5574ba15818deb535ac99d53dc9 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Sun, 26 May 2024 10:29:28 +0100 Subject: [PATCH] Self signed certificate --- .github/workflows/continuous-integration.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f4fa58a..3103abe 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -8,8 +8,20 @@ jobs: run: Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/4.0/Scream4.0.zip -OutFile Scream4.0.zip - shell: powershell run: Expand-Archive -Path Scream4.0.zip -DestinationPath Scream - - shell: powershell - run: Import-Certificate -FilePath Scream\Install\driver\x64\Scream.cat -CertStoreLocation Cert:\LocalMachine\TrustedPublisher + - run: cat "C:\Program Files\Common Files\SSL/openssl.cnf" + - run: openssl req -batch -verbose -x509 -newkey rsa -keyout ScreamCertificate.pvk -out ScreamCertificate.cer -nodes -extensions v3_req -addext extendedKeyUsage=codeSigning + - run: openssl x509 -in ScreamCertificate.cer -text + - run: 'openssl pkcs12 -export -nodes -in ScreamCertificate.cer -inkey ScreamCertificate.pvk -out ScreamCertificate.pfx -passout pass:' + - uses: ilammy/msvc-dev-cmd@v1 + - run: signtool sign /v /fd SHA256 /f ScreamCertificate.pfx Scream\Install\driver\x64\Scream.sys + - run: '& "C:\Program Files (x86)\Windows Kits\10\bin\x86\Inf2Cat.exe" /driver:Scream\Install\driver\x64\ /os:ServerFE_X64' + - run: signtool sign /v /fd SHA256 /f ScreamCertificate.pfx Scream\Install\driver\x64\Scream.cat + - run: (Get-AuthenticodeSignature Scream\Install\driver\x64\Scream.cat).SignerCertificate | Export-Certificate -FilePath cert.cer + shell: powershell + - run: Import-Certificate -FilePath cert.cer -CertStoreLocation Cert:\LocalMachine\root + shell: powershell + - run: Import-Certificate -FilePath cert.cer -CertStoreLocation Cert:\LocalMachine\TrustedPublisher + shell: powershell - shell: powershell run: Install-Module -Name PShot -AcceptLicense -Force - shell: powershell @@ -21,4 +33,4 @@ jobs: timeout-minutes: 1 - uses: actions/upload-artifact@v2 with: - path: 'PShot*' + path: .