Do not close the whole application in case of error

This commit is contained in:
tonymanou 2017-01-17 22:45:15 +01:00 committed by topjohnwu
parent a5b573eaaa
commit 61abe5b948

View File

@ -172,8 +172,7 @@ public class ZipUtils {
inputJar = new JarMap(new JarInputStream(inputStream)); inputJar = new JarMap(new JarInputStream(inputStream));
if (signWholeFile) { if (signWholeFile) {
if (!"RSA".equalsIgnoreCase(privateKey.getAlgorithm())) { if (!"RSA".equalsIgnoreCase(privateKey.getAlgorithm())) {
System.err.println("Cannot sign OTA packages with non-RSA keys"); throw new IOException("Cannot sign OTA packages with non-RSA keys");
System.exit(1);
} }
signWholeFile(inputJar, context.getAssets().open(PUBLIC_KEY_NAME), signWholeFile(inputJar, context.getAssets().open(PUBLIC_KEY_NAME),
publicKey, privateKey, outputStream); publicKey, privateKey, outputStream);