Skip to content

Commit

Permalink
[branch/v16] Invoke signing function for Windows Connect binary (#44419)
Browse files Browse the repository at this point in the history
* Invoke signing function for Windows Connect binary (#41963)

* revert accidental changes

* Add support for signing Windows binaries without a destination path (#42067)
  • Loading branch information
fheinecke authored Jul 22, 2024
1 parent 118cd24 commit a8ea70b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions build.assets/windows/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,18 @@ function Invoke-SignBinary {
<#
.SYNOPSIS
Signs the provided binary with the base64-encoded certificate listed in "$WINDOWS_SIGNING_CERT"
.PARAMETER UnsignedBinaryPath
The path to the unsigned binary.
.PARAMETER SignedBinaryPath
The path where the signed binary should be written. If not provided, then the signed binary will
be written to a temporary path, and then moved to the unsigned binary path.
#>
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[string] $UnsignedBinaryPath,

[Parameter(Mandatory)]
[Parameter()]
[string] $SignedBinaryPath
)

Expand Down Expand Up @@ -343,7 +348,7 @@ function Build-Tsh {
$UnsignedBinaryPath = "$BuildDirectory\unsigned-$BinaryName"
go build -tags piv -trimpath -ldflags "-s -w" -o "$UnsignedBinaryPath" "$TeleportSourceDirectory\tool\tsh"
if ($LastExitCode -ne 0) {
exit $LastExitCode
exit $LastExitCode
}
Write-Host "::endgroup::"

Expand Down Expand Up @@ -376,7 +381,7 @@ function Build-Tctl {
$UnsignedBinaryPath = "$BuildDirectory\unsigned-$BinaryName"
go build -tags piv -trimpath -ldflags "-s -w" -o "$UnsignedBinaryPath" "$TeleportSourceDirectory\tool\tctl"
if ($LastExitCode -ne 0) {
exit $LastExitCode
exit $LastExitCode
}
Write-Host "::endgroup::"

Expand Down

0 comments on commit a8ea70b

Please sign in to comment.