Skip to content

Commit

Permalink
check certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
BenAlvo1 committed May 1, 2024
1 parent 9f60ebc commit fcb46e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .goreleaser-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ builds:
- -s
- -w
- -X github.com/checkmarx/ast-cli/internal/params.Version={{.Version}}
# Add an additional flag to generate a signing script
- -X github.com/checkmarx/ast-cli/internal/params.SignScript={{.BuildDir}}/sign_script.sh
- main: ./cmd/main.go
env:
- CGO_ENABLED=0
Expand Down Expand Up @@ -86,10 +88,3 @@ blobs:

changelog:
use: github-native

commands:
- name: Sign Windows Executable
run: |
osslsigncode sign -key private_key.pem -cert public_key.pem -in cx.exe -out signed-cx.exe
artifact_paths:
- signed-cx.exe
10 changes: 10 additions & 0 deletions sign_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Assuming private_key.pem and public_key.pem are in the same directory as this script
PRIVATE_KEY="private_key.pem"
PUBLIC_KEY="public_key.pem"
INPUT_EXE="cx.exe"
OUTPUT_EXE="signed-cx.exe"

# Sign the executable using osslsigncode
osslsigncode sign -key "$PRIVATE_KEY" -cert "$PUBLIC_KEY" -in "$INPUT_EXE" -out "$OUTPUT_EXE"

0 comments on commit fcb46e3

Please sign in to comment.