Skip to content

Commit

Permalink
xxx
Browse files Browse the repository at this point in the history
  • Loading branch information
LDVG committed Feb 29, 2024
1 parent 469dee6 commit feed7eb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
12 changes: 10 additions & 2 deletions windows/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ New-Item -Type Directory "${STAGE}\${LIBRESSL}" -Force
New-Item -Type Directory "${STAGE}\${LIBCBOR}" -Force
New-Item -Type Directory "${STAGE}\${ZLIB}" -Force

# Create GNUPGHOME with an empty common.conf to disable use-keyboxd.
# Recent default is to enable keyboxd which in turn ignores --keyring
# arguments.
$GpgHome = "${BUILD}\.gnupg"
New-Item -Type Directory "${GpgHome}" -Force
New-Item -Type File "${GpgHome}/common.conf" -Force

# Create output directories.
New-Item -Type Directory "${OUTPUT}" -Force
New-Item -Type Directory "${OUTPUT}\${Arch}" -Force
Expand All @@ -117,8 +124,9 @@ try {
}

Copy-Item "$PSScriptRoot\libressl.gpg" -Destination "${BUILD}"
& $GPG --list-keys
& $GPG --quiet --no-default-keyring --keyring ./libressl.gpg `
& $GPG --homedir ${GpgHome} --list-keys
& $GPG --homedir ${GpgHome} --quiet --no-default-keyring `
--keyring ./libressl.gpg `
--verify .\${LIBRESSL}.tar.gz.asc .\${LIBRESSL}.tar.gz
if ($LastExitCode -ne 0) {
throw "GPG signature verification failed"
Expand Down
10 changes: 7 additions & 3 deletions windows/cygwin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ $Packages = 'gcc-core,pkg-config,cmake,make,libcbor-devel,libssl-devel,zlib-deve
# Work directories.
$Cygwin = "$PSScriptRoot\..\cygwin"
$Root = "${Cygwin}\root"
$GpgHome = "${Cygwin}\.gnupg"

# Find GPG.
$GPG = $(Get-Command gpg -ErrorAction Ignore | `
Expand All @@ -38,6 +37,11 @@ Write-Host "GPG: $GPG"
# Create work directories.
New-Item -Type Directory "${Cygwin}" -Force
New-Item -Type Directory "${Root}" -Force

# Create GNUPGHOME with an empty common.conf to disable use-keyboxd.
# Recent default is to enable keyboxd which in turn ignores --keyring
# arguments.
$GpgHome = "${Cygwin}\.gnupg"
New-Item -Type Directory "${GpgHome}" -Force
New-Item -Type File "${GpgHome}/common.conf" -Force

Expand All @@ -51,8 +55,8 @@ try {
Invoke-WebRequest ${URL}/${Setup}.sig `
-OutFile ${Cygwin}\${Setup}.sig
}
& $GPG --homedir $GpgHome --debug-all --list-keys
& $GPG --homedir $GpgHome --debug-all --quiet --no-default-keyring `
& $GPG --homedir ${GpgHome} --debug-all --list-keys
& $GPG --homedir ${GpgHome} --debug-all --quiet --no-default-keyring `
--keyring ${PSScriptRoot}/cygwin.gpg `
--verify ${Cygwin}\${Setup}.sig ${Cygwin}\${Setup}
if ($LastExitCode -ne 0) {
Expand Down

0 comments on commit feed7eb

Please sign in to comment.