File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ if [ -z "$OSSLSIGNCODE" ]; then
8
8
OSSLSIGNCODE=osslsigncode
9
9
fi
10
10
11
- if [ -z " $1 " ]; then
12
- echo " usage: $0 <osslcodesign args >"
13
- echo " example: $0 -key codesign.key"
11
+ if [ " $# " -ne 1 ]; then
12
+ echo " usage: $0 <path to key >"
13
+ echo " example: $0 codesign.key"
14
14
exit 1
15
15
fi
16
16
@@ -22,12 +22,22 @@ OUTSUBDIR="${OUTDIR}/win"
22
22
TIMESERVER=http://timestamp.comodoca.com
23
23
CERTFILE=" win-codesign.cert"
24
24
25
+ stty -echo
26
+ printf " Enter the passphrase for %s: " " $1 "
27
+ read cs_key_pass
28
+ printf " \n"
29
+ stty echo
30
+
31
+
25
32
mkdir -p " ${OUTSUBDIR} "
26
- # shellcheck disable=SC2046
27
- basename -a $( ls -1 " ${SRCDIR} " /* -unsigned.exe) | while read UNSIGNED; do
28
- echo Signing " ${UNSIGNED} "
29
- " ${OSSLSIGNCODE} " sign -certs " ${CERTFILE} " -t " ${TIMESERVER} " -h sha256 -in " ${SRCDIR} /${UNSIGNED} " -out " ${WORKDIR} /${UNSIGNED} " " $@ "
30
- " ${OSSLSIGNCODE} " extract-signature -pem -in " ${WORKDIR} /${UNSIGNED} " -out " ${OUTSUBDIR} /${UNSIGNED} .pem" && rm " ${WORKDIR} /${UNSIGNED} "
33
+ find ${SRCDIR} -wholename " *.exe" -type f -exec realpath --relative-to=. {} \; | while read -r bin
34
+ do
35
+ echo Signing " ${bin} "
36
+ bin_base=" $( realpath --relative-to=${SRCDIR} " ${bin} " ) "
37
+ mkdir -p " $( dirname ${WORKDIR} /" ${bin_base} " ) "
38
+ " ${OSSLSIGNCODE} " sign -certs " ${CERTFILE} " -t " ${TIMESERVER} " -h sha256 -in " ${bin} " -out " ${WORKDIR} /${bin_base} " -key " $1 " -pass " ${cs_key_pass} "
39
+ mkdir -p " $( dirname ${OUTSUBDIR} /" ${bin_base} " ) "
40
+ " ${OSSLSIGNCODE} " extract-signature -pem -in " ${WORKDIR} /${bin_base} " -out " ${OUTSUBDIR} /${bin_base} .pem" && rm " ${WORKDIR} /${bin_base} "
31
41
done
32
42
33
43
rm -f " ${OUT} "
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ In the `guix-build-${VERSION}/output/x86_64-apple-darwin` and `guix-build-${VERS
174
174
In the ` guix-build-${VERSION}/output/x86_64-w64-mingw32 ` directory:
175
175
176
176
tar xf bitcoin-${VERSION}-win64-codesigning.tar.gz
177
- ./detached-sig-create.sh -key /path/to/codesign.key
177
+ ./detached-sig-create.sh /path/to/codesign.key
178
178
Enter the passphrase for the key when prompted
179
179
signature-win.tar.gz will be created
180
180
You can’t perform that action at this time.
0 commit comments