Skip to content

Commit b335842

Browse files
committed
fix osslsigncode
1 parent c8db5c5 commit b335842

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

scripts/ci/funcs.sh

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -291,34 +291,40 @@ function sign_binary()
291291
#sign SHA1
292292
$HOME/osslsigncode sign \
293293
-pkcs12 $HOME/cert.p12 \
294-
-pass $CODESIGN_WIN_PASS \
294+
-pass "$CODESIGN_WIN_PASS" \
295295
-h sha1 \
296296
-n "Moolticute" \
297297
-i "http://themooltipass.com" \
298298
-t http://timestamp.comodoca.com \
299-
-in $1 -out ${1}_signed1
299+
-in "$1" -out "${1}_signed1"
300300

301-
if [ $? -eq 0 ] ; then
301+
if [ ! $? -eq 0 ] ; then
302+
set -e
302303
rm ${1}_signed1
303-
return
304+
echo "Failed to codesign SHA1"
305+
return 255
304306
fi
305307

306308
#Append SHA256
307309
$HOME/osslsigncode sign \
308310
-pkcs12 $HOME/cert.p12 \
309-
-pass $CODESIGN_WIN_PASS \
311+
-pass "$CODESIGN_WIN_PASS" \
310312
-h sha256 \
311313
-n "Moolticute" \
312314
-i "http://themooltipass.com" \
313315
-ts http://timestamp.comodoca.com \
314-
-in ${1}_signed1 -out ${1}_signed2 \
316+
-in "${1}_signed1" -out "${1}_signed2" \
315317
-nest
316318

317-
if [ $? -eq 0 ] ; then
318-
mv ${1}_signed2 $1
319-
rm ${1}_signed1
319+
if [ ! $? -eq 0 ] ; then
320+
set -e
321+
echo "Failed to codesign SHA256"
322+
return 255
323+
fi
324+
325+
mv ${1}_signed2 $1
326+
rm ${1}_signed1
320327
fi
321-
fi
322328
set -e
323329
}
324330

0 commit comments

Comments
 (0)