jdk/src/share/classes/sun/security/util/Resources.java
author vinnie
Wed, 13 Feb 2013 19:40:51 +0000
changeset 15664 e33b115f1981
parent 14182 3041082abb40
child 23010 6dadb192ad81
permissions -rw-r--r--
8007755: Support the logical grouping of keystores Reviewed-by: mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
14182
3041082abb40 7194449: String resources for Key Tool and Policy Tool should be in their respective packages
sflores
parents: 11912
diff changeset
     2
 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5462
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5462
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5462
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5462
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5462
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.security.util;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * <p> This class represents the <code>ResourceBundle</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * for javax.security.auth and sun.security.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
public class Resources extends java.util.ListResourceBundle {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
    private static final Object[][] contents = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
        // javax.security.auth.PrivateCredentialPermission
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    38
        {"invalid.null.input.s.", "invalid null input(s)"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    39
        {"actions.can.only.be.read.", "actions can only be 'read'"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    40
        {"permission.name.name.syntax.invalid.",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
                "permission name [{0}] syntax invalid: "},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    42
        {"Credential.Class.not.followed.by.a.Principal.Class.and.Name",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
                "Credential Class not followed by a Principal Class and Name"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    44
        {"Principal.Class.not.followed.by.a.Principal.Name",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
                "Principal Class not followed by a Principal Name"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    46
        {"Principal.Name.must.be.surrounded.by.quotes",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
                "Principal Name must be surrounded by quotes"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    48
        {"Principal.Name.missing.end.quote",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
                "Principal Name missing end quote"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    50
        {"PrivateCredentialPermission.Principal.Class.can.not.be.a.wildcard.value.if.Principal.Name.is.not.a.wildcard.value",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
                "PrivateCredentialPermission Principal Class can not be a wildcard (*) value if Principal Name is not a wildcard (*) value"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    52
        {"CredOwner.Principal.Class.class.Principal.Name.name",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
                "CredOwner:\n\tPrincipal Class = {0}\n\tPrincipal Name = {1}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        // javax.security.auth.x500
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    56
        {"provided.null.name", "provided null name"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    57
        {"provided.null.keyword.map", "provided null keyword map"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    58
        {"provided.null.OID.map", "provided null OID map"},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        // javax.security.auth.Subject
14182
3041082abb40 7194449: String resources for Key Tool and Policy Tool should be in their respective packages
sflores
parents: 11912
diff changeset
    61
        {"NEWLINE", "\n"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    62
        {"invalid.null.AccessControlContext.provided",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
                "invalid null AccessControlContext provided"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    64
        {"invalid.null.action.provided", "invalid null action provided"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    65
        {"invalid.null.Class.provided", "invalid null Class provided"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    66
        {"Subject.", "Subject:\n"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    67
        {".Principal.", "\tPrincipal: "},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    68
        {".Public.Credential.", "\tPublic Credential: "},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    69
        {".Private.Credentials.inaccessible.",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
                "\tPrivate Credentials inaccessible\n"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    71
        {".Private.Credential.", "\tPrivate Credential: "},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    72
        {".Private.Credential.inaccessible.",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
                "\tPrivate Credential inaccessible\n"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    74
        {"Subject.is.read.only", "Subject is read-only"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    75
        {"attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
                "attempting to add an object which is not an instance of java.security.Principal to a Subject's Principal Set"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    77
        {"attempting.to.add.an.object.which.is.not.an.instance.of.class",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
                "attempting to add an object which is not an instance of {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        // javax.security.auth.login.AppConfigurationEntry
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    81
        {"LoginModuleControlFlag.", "LoginModuleControlFlag: "},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        // javax.security.auth.login.LoginContext
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    84
        {"Invalid.null.input.name", "Invalid null input: name"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    85
        {"No.LoginModules.configured.for.name",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
         "No LoginModules configured for {0}"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    87
        {"invalid.null.Subject.provided", "invalid null Subject provided"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    88
        {"invalid.null.CallbackHandler.provided",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
                "invalid null CallbackHandler provided"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    90
        {"null.subject.logout.called.before.login",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
                "null subject - logout called before login"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    92
        {"unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
                "unable to instantiate LoginModule, {0}, because it does not provide a no-argument constructor"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    94
        {"unable.to.instantiate.LoginModule",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
                "unable to instantiate LoginModule"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    96
        {"unable.to.instantiate.LoginModule.",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
                "unable to instantiate LoginModule: "},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
    98
        {"unable.to.find.LoginModule.class.",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
                "unable to find LoginModule class: "},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   100
        {"unable.to.access.LoginModule.",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
                "unable to access LoginModule: "},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   102
        {"Login.Failure.all.modules.ignored",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
                "Login Failure: all modules ignored"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        // sun.security.provider.PolicyFile
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   107
        {"java.security.policy.error.parsing.policy.message",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
                "java.security.policy: error parsing {0}:\n\t{1}"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   109
        {"java.security.policy.error.adding.Permission.perm.message",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
                "java.security.policy: error adding Permission, {0}:\n\t{1}"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   111
        {"java.security.policy.error.adding.Entry.message",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
                "java.security.policy: error adding Entry:\n\t{0}"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   113
        {"alias.name.not.provided.pe.name.", "alias name not provided ({0})"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   114
        {"unable.to.perform.substitution.on.alias.suffix",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
                "unable to perform substitution on alias, {0}"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   116
        {"substitution.value.prefix.unsupported",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
                "substitution value, {0}, unsupported"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   118
        {"LPARAM", "("},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   119
        {"RPARAM", ")"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   120
        {"type.can.t.be.null","type can't be null"},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        // sun.security.provider.PolicyParser
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   123
        {"keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
                "keystorePasswordURL can not be specified without also specifying keystore"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   125
        {"expected.keystore.type", "expected keystore type"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   126
        {"expected.keystore.provider", "expected keystore provider"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   127
        {"multiple.Codebase.expressions",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
                "multiple Codebase expressions"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   129
        {"multiple.SignedBy.expressions","multiple SignedBy expressions"},
15664
e33b115f1981 8007755: Support the logical grouping of keystores
vinnie
parents: 14182
diff changeset
   130
        {"duplicate.keystore.domain.name","duplicate keystore domain name: {0}"},
e33b115f1981 8007755: Support the logical grouping of keystores
vinnie
parents: 14182
diff changeset
   131
        {"duplicate.keystore.name","duplicate keystore name: {0}"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   132
        {"SignedBy.has.empty.alias","SignedBy has empty alias"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   133
        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
                "can not specify Principal with a wildcard class without a wildcard name"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   135
        {"expected.codeBase.or.SignedBy.or.Principal",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
                "expected codeBase or SignedBy or Principal"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   137
        {"expected.permission.entry", "expected permission entry"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   138
        {"number.", "number "},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   139
        {"expected.expect.read.end.of.file.",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                "expected [{0}], read [end of file]"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   141
        {"expected.read.end.of.file.",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                "expected [;], read [end of file]"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   143
        {"line.number.msg", "line {0}: {1}"},
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   144
        {"line.number.expected.expect.found.actual.",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
                "line {0}: expected [{1}], found [{2}]"},
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   146
        {"null.principalClass.or.principalName",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
                "null principalClass or principalName"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        // sun.security.pkcs11.SunPKCS11
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   150
        {"PKCS11.Token.providerName.Password.",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
                "PKCS11 Token [{0}] Password: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        /* --- DEPRECATED --- */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
        // javax.security.auth.Policy
7179
4afb81e50183 6987827: security/util/Resources.java needs improvement
weijun
parents: 6688
diff changeset
   155
        {"unable.to.instantiate.Subject.based.policy",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
                "unable to instantiate Subject-based policy"}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     * Returns the contents of this <code>ResourceBundle</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * @return the contents of this <code>ResourceBundle</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     */
14182
3041082abb40 7194449: String resources for Key Tool and Policy Tool should be in their respective packages
sflores
parents: 11912
diff changeset
   167
    @Override
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    public Object[][] getContents() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        return contents;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
}
3948
736156ecc24c 6324292: keytool -help is unhelpful
weijun
parents: 3318
diff changeset
   172