File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments