Skip to content

Commit

Permalink
release.sh: fix signing
Browse files Browse the repository at this point in the history
minisign is the way to go
  • Loading branch information
classabbyamp committed Feb 24, 2024
1 parent 7479e6d commit da202eb
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,22 @@ download_build() {
}

sign_build() {
check_programs pwgen signify
DATE="$1"
check_programs pwgen minisign
DATECODE="$1"
SUMFILE="$2"
mkdir -p release
KEYFILE="release/void-release-$DATE.key"
pwgen -cny 25 1 > "$KEYFILE"
signify -G -p "${KEYFILE//key/pub}" -s "${KEYFILE//key/sec}" -c "This key is only valid for images with date $DATE."
signify -S -e -s "${KEYFILE//key/sec}" -m "$SUMFILE" -x "${SUMFILE//txt/sig}"

echo "Creating key..."
pwgen -cny 25 1 > "release/void-release-$DATECODE.key"
minisign -G -p "release/void-release-$DATECODE.pub" \
-s "release/void-release-$DATECODE.sec" \
-c "This key is only valid for images with date $DATECODE."

echo "Signing $SUMFILE..."
minisign -S -x "${SUMFILE//txt/sig}" -s "release/void-release-$DATECODE.sec" \
-c "This key is only valid for images with date $DATECODE." \
-t "This key is only valid for images with date $DATECODE." \
-m "$SUMFILE"
}

case "$1" in
Expand Down

0 comments on commit da202eb

Please sign in to comment.