# HG changeset patch # User weijun # Date 1470664261 -28800 # Node ID e2a7079bd50a895e7dfc6b0946d0a88fd3ca4e7b # Parent a4fe1df34f0f57f528ec360bd978eecb39cfbeaa 8163303: Remove identity scope information from jarsigner -verbose output Reviewed-by: mullan diff -r a4fe1df34f0f -r e2a7079bd50a jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java --- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java Fri Aug 05 18:45:40 2016 -0700 +++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java Mon Aug 08 21:51:01 2016 +0800 @@ -70,7 +70,6 @@ * @author Roland Schemers * @author Jan Luehe */ -@SuppressWarnings("deprecation") public class Main { // for i18n @@ -98,7 +97,6 @@ static final String VERSION = "1.0"; static final int IN_KEYSTORE = 0x01; // signer is in keystore - static final int IN_SCOPE = 0x02; static final int NOT_ALIAS = 0x04; // alias list is NOT empty and // signer is not in alias list static final int SIGNED_BY_ALIAS = 0x08; // signer is in alias list @@ -676,14 +674,13 @@ hasUnsignedEntry |= !je.isDirectory() && !isSigned && !signatureRelated(name); - int inStoreOrScope = inKeyStore(signers); + int inStoreWithAlias = inKeyStore(signers); + + boolean inStore = (inStoreWithAlias & IN_KEYSTORE) != 0; - boolean inStore = (inStoreOrScope & IN_KEYSTORE) != 0; - boolean inScope = (inStoreOrScope & IN_SCOPE) != 0; - - notSignedByAlias |= (inStoreOrScope & NOT_ALIAS) != 0; + notSignedByAlias |= (inStoreWithAlias & NOT_ALIAS) != 0; if (keystore != null) { - aliasNotInStore |= isSigned && (!inStore && !inScope); + aliasNotInStore |= isSigned && !inStore; } // Only used when -verbose provided @@ -697,8 +694,7 @@ sb.append(isSigned ? rb.getString("s") : rb.getString("SPACE")) .append(inManifest ? rb.getString("m") : rb.getString("SPACE")) .append(inStore ? rb.getString("k") : rb.getString("SPACE")) - .append(inScope ? rb.getString("i") : rb.getString("SPACE")) - .append((inStoreOrScope & NOT_ALIAS) != 0 ? 'X' : ' ') + .append((inStoreWithAlias & NOT_ALIAS) != 0 ? 'X' : ' ') .append(rb.getString("SPACE")); sb.append('|'); } @@ -800,8 +796,6 @@ ".m.entry.is.listed.in.manifest")); System.out.println(rb.getString( ".k.at.least.one.certificate.was.found.in.keystore")); - System.out.println(rb.getString( - ".i.at.least.one.certificate.was.found.in.identity.scope")); if (ckaliases.size() > 0) { System.out.println(rb.getString( ".X.not.signed.by.specified.alias.es.")); @@ -1076,8 +1070,6 @@ if (alias != null) { if (alias.startsWith("(")) { result |= IN_KEYSTORE; - } else if (alias.startsWith("[")) { - result |= IN_SCOPE; } if (ckaliases.contains(alias.substring(1, alias.length() - 1))) { result |= SIGNED_BY_ALIAS; diff -r a4fe1df34f0f -r e2a7079bd50a jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java --- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java Fri Aug 05 18:45:40 2016 -0700 +++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java Mon Aug 08 21:51:01 2016 +0800 @@ -130,7 +130,6 @@ {"s", "s"}, {"m", "m"}, {"k", "k"}, - {"i", "i"}, {".and.d.more.", "(and %d more)"}, {".s.signature.was.verified.", " s = signature was verified "}, @@ -138,8 +137,6 @@ " m = entry is listed in manifest"}, {".k.at.least.one.certificate.was.found.in.keystore", " k = at least one certificate was found in keystore"}, - {".i.at.least.one.certificate.was.found.in.identity.scope", - " i = at least one certificate was found in identity scope"}, {".X.not.signed.by.specified.alias.es.", " X = not signed by specified alias(es)"}, {"no.manifest.", "no manifest."}, diff -r a4fe1df34f0f -r e2a7079bd50a jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java --- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java Fri Aug 05 18:45:40 2016 -0700 +++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java Mon Aug 08 21:51:01 2016 +0800 @@ -123,7 +123,6 @@ {"s", "s"}, {"m", "m"}, {"k", "k"}, - {"i", "i"}, {".and.d.more.", "(\u4ED6\u306B\u3082%d\u500B)"}, {".s.signature.was.verified.", " s=\u7F72\u540D\u304C\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F "}, @@ -131,8 +130,6 @@ " m=\u30A8\u30F3\u30C8\u30EA\u304C\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u5185\u306B\u30EA\u30B9\u30C8\u3055\u308C\u307E\u3059"}, {".k.at.least.one.certificate.was.found.in.keystore", " k=1\u3064\u4EE5\u4E0A\u306E\u8A3C\u660E\u66F8\u304C\u30AD\u30FC\u30B9\u30C8\u30A2\u3067\u691C\u51FA\u3055\u308C\u307E\u3057\u305F"}, - {".i.at.least.one.certificate.was.found.in.identity.scope", - " i=1\u3064\u4EE5\u4E0A\u306E\u8A3C\u660E\u66F8\u304C\u30A2\u30A4\u30C7\u30F3\u30C6\u30A3\u30C6\u30A3\u30FB\u30B9\u30B3\u30FC\u30D7\u3067\u691C\u51FA\u3055\u308C\u307E\u3057\u305F"}, {".X.not.signed.by.specified.alias.es.", " X =\u6307\u5B9A\u3057\u305F\u5225\u540D\u3067\u7F72\u540D\u3055\u308C\u3066\u3044\u307E\u305B\u3093"}, {"no.manifest.", "\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002"}, diff -r a4fe1df34f0f -r e2a7079bd50a jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java --- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java Fri Aug 05 18:45:40 2016 -0700 +++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java Mon Aug 08 21:51:01 2016 +0800 @@ -123,7 +123,6 @@ {"s", "s"}, {"m", "m"}, {"k", "k"}, - {"i", "i"}, {".and.d.more.", "(%d \u53CA\u4EE5\u4E0A)"}, {".s.signature.was.verified.", " s = \u5DF2\u9A8C\u8BC1\u7B7E\u540D "}, @@ -131,8 +130,6 @@ " m = \u5728\u6E05\u5355\u4E2D\u5217\u51FA\u6761\u76EE"}, {".k.at.least.one.certificate.was.found.in.keystore", " k = \u5728\u5BC6\u94A5\u5E93\u4E2D\u81F3\u5C11\u627E\u5230\u4E86\u4E00\u4E2A\u8BC1\u4E66"}, - {".i.at.least.one.certificate.was.found.in.identity.scope", - " i = \u5728\u8EAB\u4EFD\u4F5C\u7528\u57DF\u5185\u81F3\u5C11\u627E\u5230\u4E86\u4E00\u4E2A\u8BC1\u4E66"}, {".X.not.signed.by.specified.alias.es.", " X = \u672A\u7531\u6307\u5B9A\u522B\u540D\u7B7E\u540D"}, {"no.manifest.", "\u6CA1\u6709\u6E05\u5355\u3002"},