diff --git a/signing/src/main/java/com/topjohnwu/signing/BootSigner.java b/signing/src/main/java/com/topjohnwu/signing/BootSigner.java index 6a7c3f91b..f9210e964 100644 --- a/signing/src/main/java/com/topjohnwu/signing/BootSigner.java +++ b/signing/src/main/java/com/topjohnwu/signing/BootSigner.java @@ -18,13 +18,17 @@ public class BootSigner { } else if (args.length > 0 && "-sign".equals(args[0])) { InputStream cert = null; InputStream key = null; + String name = "/boot"; if (args.length >= 3) { cert = new FileInputStream(args[1]); key = new FileInputStream(args[2]); } + if (args.length >= 4) { + name = args[3]; + } - boolean success = SignBoot.doSignature("/boot", System.in, System.out, cert, key); + boolean success = SignBoot.doSignature(name, System.in, System.out, cert, key); System.exit(success ? 0 : 1); } else { System.err.println( @@ -34,8 +38,9 @@ public class BootSigner { "Actions:\n" + " -verify [x509.pem]\n" + " verify image, cert is optional\n" + - " -sign [x509.pem] [pk8]\n" + - " sign image, cert and key pair is optional\n" + " -sign [x509.pem] [pk8] [name]\n" + + " sign image, name, cert and key pair are optional\n" + + " name should be /boot (default) or /recovery\n" ); } }