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));
if (signWholeFile) {
if (!"RSA".equalsIgnoreCase(privateKey.getAlgorithm())) {
System.err.println("Cannot sign OTA packages with non-RSA keys");
System.exit(1);
throw new IOException("Cannot sign OTA packages with non-RSA keys");
}
signWholeFile(inputJar, context.getAssets().open(PUBLIC_KEY_NAME),
publicKey, privateKey, outputStream);