8163303: Remove identity scope information from jarsigner -verbose output
Reviewed-by: mullan
This commit is contained in:
parent
9b7097c149
commit
d418a61b62
@ -70,7 +70,6 @@ import sun.security.util.*;
|
||||
* @author Roland Schemers
|
||||
* @author Jan Luehe
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class Main {
|
||||
|
||||
// for i18n
|
||||
@ -98,7 +97,6 @@ public class Main {
|
||||
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 @@ public class Main {
|
||||
hasUnsignedEntry |= !je.isDirectory() && !isSigned
|
||||
&& !signatureRelated(name);
|
||||
|
||||
int inStoreOrScope = inKeyStore(signers);
|
||||
int inStoreWithAlias = inKeyStore(signers);
|
||||
|
||||
boolean inStore = (inStoreOrScope & IN_KEYSTORE) != 0;
|
||||
boolean inScope = (inStoreOrScope & IN_SCOPE) != 0;
|
||||
boolean inStore = (inStoreWithAlias & IN_KEYSTORE) != 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 @@ public class Main {
|
||||
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 @@ public class Main {
|
||||
".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 @@ public class Main {
|
||||
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;
|
||||
|
@ -130,7 +130,6 @@ public class Resources extends java.util.ListResourceBundle {
|
||||
{"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 @@ public class Resources extends java.util.ListResourceBundle {
|
||||
" 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."},
|
||||
|
@ -123,7 +123,6 @@ public class Resources_ja extends java.util.ListResourceBundle {
|
||||
{"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 @@ public class Resources_ja extends java.util.ListResourceBundle {
|
||||
" 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"},
|
||||
|
@ -123,7 +123,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle {
|
||||
{"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 @@ public class Resources_zh_CN extends java.util.ListResourceBundle {
|
||||
" 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"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user