Re: RFR 8172422: jarsigner needs to understand -?

2017-01-17 Thread Sean Mullan

Looks good to me.

--Sean

On 1/15/17 8:41 PM, Weijun Wang wrote:

Please review the code change at

   http://cr.openjdk.java.net/~weijun/8172529/webrev.02

The validator is updated to be a PKIXValidator of the
Validator.VAR_CODE_SIGNING variant. In order to have the same output
message and exit code as before, the ValidatorException thrown when
validation fails is suppressed when there are existing error flags for
several reasons.

*jigsaw-dev*: The following change is made in java.base/module-info.java:

+exports sun.security.validator to
+jdk.jartool;

Thanks
Max


Re: RFR 8172422: jarsigner needs to understand -?

2017-01-16 Thread Alan Bateman



On 16/01/2017 01:41, Weijun Wang wrote:

Please review the code change at

   http://cr.openjdk.java.net/~weijun/8172529/webrev.02

The validator is updated to be a PKIXValidator of the 
Validator.VAR_CODE_SIGNING variant. In order to have the same output 
message and exit code as before, the ValidatorException thrown when 
validation fails is suppressed when there are existing error flags for 
several reasons.


*jigsaw-dev*: The following change is made in java.base/module-info.java:

+exports sun.security.validator to
+jdk.jartool;
That part looks okay to me although at some point we need to go over 
every one of these qualified exports with a view to removing as many of 
possible.


-Alan


RFR 8172422: jarsigner needs to understand -?

2017-01-15 Thread Weijun Wang

Please review the code change at

   http://cr.openjdk.java.net/~weijun/8172529/webrev.02

The validator is updated to be a PKIXValidator of the 
Validator.VAR_CODE_SIGNING variant. In order to have the same output 
message and exit code as before, the ValidatorException thrown when 
validation fails is suppressed when there are existing error flags for 
several reasons.


*jigsaw-dev*: The following change is made in java.base/module-info.java:

+exports sun.security.validator to
+jdk.jartool;

Thanks
Max


Re: RFR 8172422: jarsigner needs to understand -?

2017-01-13 Thread Sean Mullan
Looks ok, but is this for JDK 9? If so, we shouldn't be fixing P4 bugs 
now since we are in Rampdown Phase 1.


--Sean

On 1/13/17 6:51 AM, Weijun Wang wrote:

Please review this code change:

diff --git
a/src/java.base/share/classes/sun/security/tools/keytool/Main.java
b/src/java.base/share/classes/sun/security/tools/keytool/Main.java
--- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java
@@ -474,7 +474,9 @@

 if (c != null) {
 command = c;
-} else if (collator.compare(flags, "-help") == 0) {
+} else if (collator.compare(flags, "-help") == 0 ||
+collator.compare(flags, "-h") == 0 ||
+collator.compare(flags, "-?") == 0) {
 help = true;
 } else if (collator.compare(flags, "-conf") == 0) {
 i++;
diff --git
a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java
b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java
--- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java
+++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java
@@ -444,6 +444,7 @@
 } else if (collator.compare(flags, "-strict") ==0) {
 strict = true;
 } else if (collator.compare(flags, "-h") == 0 ||
+collator.compare(flags, "-?") == 0 ||
 collator.compare(flags, "-help") == 0) {
 fullusage();
 } else {

I don't intend to show it in the help screen. These tools have no other
options or commands that show an "alias". Some do have "legacy" names
(For example, "-genkeypair" was "-genkey") but they are not shown either.

Noreg-trivial.

Thanks
Max


RFR 8172422: jarsigner needs to understand -?

2017-01-13 Thread Weijun Wang

Please review this code change:

diff --git 
a/src/java.base/share/classes/sun/security/tools/keytool/Main.java 
b/src/java.base/share/classes/sun/security/tools/keytool/Main.java

--- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java
@@ -474,7 +474,9 @@

 if (c != null) {
 command = c;
-} else if (collator.compare(flags, "-help") == 0) {
+} else if (collator.compare(flags, "-help") == 0 ||
+collator.compare(flags, "-h") == 0 ||
+collator.compare(flags, "-?") == 0) {
 help = true;
 } else if (collator.compare(flags, "-conf") == 0) {
 i++;
diff --git 
a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java 
b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java

--- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java
+++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java
@@ -444,6 +444,7 @@
 } else if (collator.compare(flags, "-strict") ==0) {
 strict = true;
 } else if (collator.compare(flags, "-h") == 0 ||
+collator.compare(flags, "-?") == 0 ||
 collator.compare(flags, "-help") == 0) {
 fullusage();
 } else {

I don't intend to show it in the help screen. These tools have no other 
options or commands that show an "alias". Some do have "legacy" names 
(For example, "-genkeypair" was "-genkey") but they are not shown either.


Noreg-trivial.

Thanks
Max