2013-08-09 11:33:45 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# attach ascii armored signature to a PE binary
|
|
|
|
set -e
|
|
|
|
|
|
|
|
sig="$1"
|
|
|
|
infile="$2"
|
|
|
|
if [ -z "$sig" -o ! -e "$sig" -o -z "$infile" -o ! -e "$infile" ]; then
|
|
|
|
echo "USAGE: $0 sig.asc file.efi"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
outfile="${infile%.efi}-signed.efi"
|
|
|
|
|
2014-04-29 09:15:01 +02:00
|
|
|
pesign -m "$sig" -i "$infile" -o "$outfile"
|