Skip to content

Commit

Permalink
Add a 1 minute timeout limit to calling jarsigner
Browse files Browse the repository at this point in the history
  • Loading branch information
mfonville committed May 19, 2016
1 parent d734a2a commit 9c728b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/inc.sourceshelper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ getsetupwizardproduct() {
verifyapk() {
notinzip=""
if importcert "$1" "$2"; then #always import, because sometimes new certificates are supplied but it would never be detected because the exitcode of jarsigner -verify would be 0, because the existing certificates would suffice
if ! jarsigner -verify -keystore "$CERTIFICATES/opengapps.keystore" -strict "$1" 1>/dev/null 2>&1; then
if ! timeout 1m jarsigner -verify -keystore "$CERTIFICATES/opengapps.keystore" -strict "$1" 1>/dev/null 2>&1; then # timeout added because sometimes jarsigner can get stuck for an unknown reason
return $UNSIGNEDFILES #contains files not signed by Google. APK not imported
fi
else
Expand Down

0 comments on commit 9c728b1

Please sign in to comment.