This commit is contained in:
Sean Mullan 2011-03-29 11:37:48 -04:00
commit 58cc210582
6 changed files with 32 additions and 46 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,13 +30,14 @@ import java.lang.RuntimePermission;
import java.net.MalformedURLException;
import java.net.SocketPermission;
import java.net.URL;
import java.security.GeneralSecurityException;
import java.text.MessageFormat;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.LinkedList;
import java.util.ListIterator;
import java.util.Vector;
import java.util.StringTokenizer;
import java.security.GeneralSecurityException;
import sun.security.util.PropertyExpander;
/**
@ -368,8 +369,8 @@ class PolicyParser {
"WILDCARD class but no WILDCARD name");
throw new ParsingException
(st.lineno(),
rb.getString("can.not.specify.Principal.with.a.") +
rb.getString("wildcard.class.without.a.wildcard.name"));
rb.getString("can.not.specify.Principal.with.a." +
"wildcard.class.without.a.wildcard.name"));
}
try {
@ -525,9 +526,10 @@ class PolicyParser {
rb.getString("number.") +
String.valueOf(st.nval));
case StreamTokenizer.TT_EOF:
throw new ParsingException
(rb.getString("expected.") + expect +
rb.getString(".read.end.of.file"));
MessageFormat form = new MessageFormat(
rb.getString("expected.expect.read.end.of.file."));
Object[] source = {expect};
throw new ParsingException(form.format(source));
case StreamTokenizer.TT_WORD:
if (expect.equalsIgnoreCase(st.sval)) {
lookahead = st.nextToken();

View File

@ -1238,8 +1238,6 @@ public class JarSigner {
// Provide a helpful message when TSA is beyond a firewall
error(rb.getString("unable.to.sign.jar.") +
rb.getString("no.response.from.the.Timestamping.Authority.") +
rb.getString("When.connecting.from.behind.a.firewall.an.HTTP.or.HTTPS.proxy.may.need.to.be.specified.") +
rb.getString("Supply.the.following.options.to.jarsigner.") +
"\n -J-Dhttp.proxyHost=<hostname>" +
"\n -J-Dhttp.proxyPort=<portnumber>\n" +
rb.getString("or") +

View File

@ -181,11 +181,9 @@ public class JarSignerResources extends java.util.ListResourceBundle {
{"TSA.location.", "TSA location: "},
{"TSA.certificate.", "TSA certificate: "},
{"no.response.from.the.Timestamping.Authority.",
"no response from the Timestamping Authority. "},
{"When.connecting.from.behind.a.firewall.an.HTTP.or.HTTPS.proxy.may.need.to.be.specified.",
"When connecting from behind a firewall an HTTP or HTTPS proxy may need to be specified. "},
{"Supply.the.following.options.to.jarsigner.",
"Supply the following options to jarsigner: "},
"no response from the Timestamping Authority. When connecting"
+ " from behind a firewall an HTTP or HTTPS proxy may need to"
+ " be specified. Supply the following options to jarsigner:"},
{"or", "or"},
{"Certificate.not.found.for.alias.alias.must.reference.a.valid.KeyStore.entry.containing.an.X.509.public.key.certificate.for.the",
"Certificate not found for: {0}. {1} must reference a valid KeyStore entry containing an X.509 public key certificate for the Timestamping Authority."},

View File

@ -1740,16 +1740,19 @@ public final class KeyTool {
KeyStore.TrustedCertificateEntry.class)) {
// We have a trusted certificate entry
Certificate cert = keyStore.getCertificate(alias);
Object[] source = {"trustedCertEntry"};
String mf = new MessageFormat(
rb.getString("Entry.type.type.")).format(source) + "\n";
if (verbose && (cert instanceof X509Certificate)) {
out.println(rb.getString("Entry.type.trustedCertEntry."));
out.println(mf);
printX509Cert((X509Certificate)cert, out);
} else if (rfc) {
out.println(rb.getString("Entry.type.trustedCertEntry."));
out.println(mf);
dumpCert(cert, out);
} else if (debug) {
out.println(cert.toString());
} else {
out.println(rb.getString("trustedCertEntry."));
out.println("trustedCertEntry, ");
out.println(rb.getString("Certificate.fingerprint.SHA1.")
+ getCertFingerPrint("SHA1", cert));
}
@ -1836,10 +1839,6 @@ public final class KeyTool {
(".WARNING.WARNING.WARNING."));
System.err.println(rb.getString
(".The.integrity.of.the.information.stored.in.the.srckeystore."));
System.err.println(rb.getString
(".has.NOT.been.verified.In.order.to.verify.its.integrity."));
System.err.println(rb.getString
(".you.must.provide.the.srckeystore.password."));
System.err.println(rb.getString
(".WARNING.WARNING.WARNING."));
System.err.println();
@ -3186,10 +3185,6 @@ public final class KeyTool {
(".WARNING.WARNING.WARNING."));
System.err.println(rb.getString
(".The.integrity.of.the.information.stored.in.your.keystore."));
System.err.println(rb.getString
(".has.NOT.been.verified.In.order.to.verify.its.integrity."));
System.err.println(rb.getString
(".you.must.provide.your.keystore.password."));
System.err.println(rb.getString
(".WARNING.WARNING.WARNING."));
System.err.println();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -111,17 +111,15 @@ public class AuthResources extends java.util.ListResourceBundle {
// com.sun.security.auth.PolicyParser
{"expected.keystore.type", "expected keystore type"},
{"can.not.specify.Principal.with.a.",
"can not specify Principal with a "},
{"wildcard.class.without.a.wildcard.name",
"wildcard class without a wildcard name"},
{"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
"can not specify Principal with a wildcard class without a wildcard name"},
{"expected.codeBase.or.SignedBy", "expected codeBase or SignedBy"},
{"only.Principal.based.grant.entries.permitted",
"only Principal-based grant entries permitted"},
{"expected.permission.entry", "expected permission entry"},
{"number.", "number "},
{"expected.", "expected "},
{".read.end.of.file", ", read end of file"},
{"expected.expect.read.end.of.file.",
"expected {0}, read end of file"},
{"expected.read.end.of.file", "expected ';', read end of file"},
{"line.", "line "},
{".expected.", ": expected '"},
@ -136,6 +134,9 @@ public class AuthResources extends java.util.ListResourceBundle {
{"SolarisNumericUserPrincipal.",
"SolarisNumericUserPrincipal: "},
{"SolarisPrincipal.", "SolarisPrincipal: "},
// provided.null.name is the NullPointerException message when a
// developer incorrectly passes a null name to the constructor of
// subclasses of java.security.Principal
{"provided.null.name", "provided null name"}
};

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -304,8 +304,6 @@ public class Resources extends java.util.ListResourceBundle {
{"Certificate.chain.length.", "Certificate chain length: "},
{"Certificate.i.1.", "Certificate[{0,number,integer}]:"},
{"Certificate.fingerprint.SHA1.", "Certificate fingerprint (SHA1): "},
{"Entry.type.trustedCertEntry.", "Entry type: trustedCertEntry\n"},
{"trustedCertEntry.", "trustedCertEntry,"},
{"Keystore.type.", "Keystore type: "},
{"Keystore.provider.", "Keystore provider: "},
{"Your.keystore.contains.keyStore.size.entry",
@ -378,21 +376,15 @@ public class Resources extends java.util.ListResourceBundle {
{"No.certificate.from.the.SSL.server",
"No certificate from the SSL server"},
// Translators of the following 5 pairs, ATTENTION:
// the next 5 string pairs are meant to be combined into 2 paragraphs,
// 1+3+4 and 2+3+5. make sure your translation also does.
{".The.integrity.of.the.information.stored.in.your.keystore.",
"* The integrity of the information stored in your keystore *"},
{".The.integrity.of.the.information.stored.in.the.srckeystore.",
"* The integrity of the information stored in the srckeystore*"},
{".has.NOT.been.verified.In.order.to.verify.its.integrity.",
"* has NOT been verified! In order to verify its integrity, *"},
{".you.must.provide.your.keystore.password.",
"* The integrity of the information stored in your keystore *\n" +
"* has NOT been verified! In order to verify its integrity, *\n" +
"* you must provide your keystore password. *"},
{".you.must.provide.the.srckeystore.password.",
{".The.integrity.of.the.information.stored.in.the.srckeystore.",
"* The integrity of the information stored in the srckeystore*\n" +
"* has NOT been verified! In order to verify its integrity, *\n" +
"* you must provide the srckeystore password. *"},
{"Certificate.reply.does.not.contain.public.key.for.alias.",
"Certificate reply does not contain public key for <{0}>"},
{"Incomplete.certificate.chain.in.reply",