- Notifications
You must be signed in to change notification settings - Fork1k
feat: sign windows binaries#13086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
16 commits Select commitHold shift + click to select a range
43c1463
feat: sign windows binaries
sreya29f5da3
typo
sreyad4ae773
java
sreyacd2b975
whoops
sreya00ba1bf
checkout first
sreya535bdff
access-token
sreyad0cc85e
idk
sreya156b5ea
wrong principal
sreyaf136fa1
test token
sreyaf7879a7
wrong format
sreya6fad022
big O
sreyaea9afe9
i mean wtf
sreya902bff8
update CI workflow
sreya640cc1b
update windows script comment
sreya40449b8
remove test release workflow
sreyaafc9564
make fmt
sreyaFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
39 changes: 39 additions & 0 deletions.github/workflows/release.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletionsscripts/build_go.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletionsscripts/sign_windows.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
# This script signs the provided windows binary with an Extended Validation | ||
# code signing certificate. | ||
# | ||
# Usage: ./sign_windows.sh path/to/binary | ||
# | ||
# On success, the input file will be signed using the EV cert. | ||
# | ||
# Depends on the jsign utility (and thus Java). Requires the following environment variables | ||
# to be set: | ||
# - $JSIGN_PATH: The path to the jsign jar. | ||
# - $EV_KEYSTORE: The name of the keyring containing the private key | ||
# - $EV_KEY: The name of the key. | ||
# - $EV_CERTIFICATE_PATH: The path to the certificate. | ||
# - $EV_TSA_URL: The url of the timestamp server to use. | ||
set -euo pipefail | ||
# shellcheck source=scripts/lib.sh | ||
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh" | ||
# Check dependencies | ||
dependencies java | ||
requiredenvs JSIGN_PATH EV_KEYSTORE EV_KEY EV_CERTIFICATE_PATH EV_TSA_URL GCLOUD_ACCESS_TOKEN | ||
java -jar "$JSIGN_PATH" \ | ||
--storetype GOOGLECLOUD \ | ||
--storepass "$GCLOUD_ACCESS_TOKEN" \ | ||
--keystore "$EV_KEYSTORE" \ | ||
--alias "$EV_KEY" \ | ||
--certfile "$EV_CERTIFICATE_PATH" \ | ||
--tsmode RFC3161 \ | ||
--tsaurl "$EV_TSA_URL" \ | ||
"$@" \ | ||
1>&2 |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.