jdk/src/share/classes/sun/security/util/AuthResources.java
author weijun
Wed, 21 Oct 2009 08:17:35 +0800
changeset 4152 bc36a9f01ac6
parent 2 90ce3da70b43
child 5506 202f599c92aa
permissions -rw-r--r--
6870812: enhance security tools to use ECC algorithms Reviewed-by: vinnie, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
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
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
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 the following packages:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * <ol>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * <li> com.sun.security.auth
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * <li> com.sun.security.auth.login
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * </ol>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
public class AuthResources extends java.util.ListResourceBundle {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    private static final Object[][] contents = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
        // NT principals
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
        {"invalid null input: value", "invalid null input: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
        {"NTDomainPrincipal: name", "NTDomainPrincipal: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
        {"NTNumericCredential: name", "NTNumericCredential: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
        {"Invalid NTSid value", "Invalid NTSid value"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
        {"NTSid: name", "NTSid: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        {"NTSidDomainPrincipal: name", "NTSidDomainPrincipal: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
        {"NTSidGroupPrincipal: name", "NTSidGroupPrincipal: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        {"NTSidPrimaryGroupPrincipal: name", "NTSidPrimaryGroupPrincipal: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
        {"NTSidUserPrincipal: name", "NTSidUserPrincipal: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
        {"NTUserPrincipal: name", "NTUserPrincipal: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
        // UnixPrincipals
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        {"UnixNumericGroupPrincipal [Primary Group]: name",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
                "UnixNumericGroupPrincipal [Primary Group]: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        {"UnixNumericGroupPrincipal [Supplementary Group]: name",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
                "UnixNumericGroupPrincipal [Supplementary Group]: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        {"UnixNumericUserPrincipal: name", "UnixNumericUserPrincipal: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        {"UnixPrincipal: name", "UnixPrincipal: {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        // com.sun.security.auth.login.ConfigFile
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        {"Unable to properly expand config", "Unable to properly expand {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
        {"extra_config (No such file or directory)",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
                "{0} (No such file or directory)"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
        {"Configuration Error:\n\tNo such file or directory",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
                "Configuration Error:\n\tNo such file or directory"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        {"Configuration Error:\n\tInvalid control flag, flag",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
                "Configuration Error:\n\tInvalid control flag, {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        {"Configuration Error:\n\tCan not specify multiple entries for appName",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
            "Configuration Error:\n\tCan not specify multiple entries for {0}"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        {"Configuration Error:\n\texpected [expect], read [end of file]",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
                "Configuration Error:\n\texpected [{0}], read [end of file]"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        {"Configuration Error:\n\tLine line: expected [expect], found [value]",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
            "Configuration Error:\n\tLine {0}: expected [{1}], found [{2}]"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        {"Configuration Error:\n\tLine line: expected [expect]",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
            "Configuration Error:\n\tLine {0}: expected [{1}]"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        {"Configuration Error:\n\tLine line: system property [value] expanded to empty value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
            "Configuration Error:\n\tLine {0}: system property [{1}] expanded to empty value"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        // com.sun.security.auth.module.JndiLoginModule
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        {"username: ","username: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        {"password: ","password: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        // com.sun.security.auth.module.KeyStoreLoginModule
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
        {"Please enter keystore information",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
                "Please enter keystore information"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
        {"Keystore alias: ","Keystore alias: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        {"Keystore password: ","Keystore password: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        {"Private key password (optional): ",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
            "Private key password (optional): "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        // com.sun.security.auth.module.Krb5LoginModule
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        {"Kerberos username [[defUsername]]: ",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
                "Kerberos username [{0}]: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        {"Kerberos password for [username]: ",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
                "Kerberos password for {0}: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        /***    EVERYTHING BELOW IS DEPRECATED  ***/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        // com.sun.security.auth.PolicyFile
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        {": error parsing ", ": error parsing "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        {": ", ": "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        {": error adding Permission ", ": error adding Permission "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        {" ", " "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
        {": error adding Entry ", ": error adding Entry "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
        {"(", "("},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        {")", ")"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        {"attempt to add a Permission to a readonly PermissionCollection",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
            "attempt to add a Permission to a readonly PermissionCollection"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        // com.sun.security.auth.PolicyParser
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        {"expected keystore type", "expected keystore type"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        {"can not specify Principal with a ",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
                "can not specify Principal with a "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        {"wildcard class without a wildcard name",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
                "wildcard class without a wildcard name"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        {"expected codeBase or SignedBy", "expected codeBase or SignedBy"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        {"only Principal-based grant entries permitted",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
                "only Principal-based grant entries permitted"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        {"expected permission entry", "expected permission entry"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        {"number ", "number "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        {"expected ", "expected "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        {", read end of file", ", read end of file"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        {"expected ';', read end of file", "expected ';', read end of file"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        {"line ", "line "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
        {": expected '", ": expected '"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        {"', found '", "', found '"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        {"'", "'"},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        // SolarisPrincipals
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
        {"SolarisNumericGroupPrincipal [Primary Group]: ",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                "SolarisNumericGroupPrincipal [Primary Group]: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        {"SolarisNumericGroupPrincipal [Supplementary Group]: ",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                "SolarisNumericGroupPrincipal [Supplementary Group]: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
        {"SolarisNumericUserPrincipal: ",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
                "SolarisNumericUserPrincipal: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        {"SolarisPrincipal: ", "SolarisPrincipal: "},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
        {"provided null name", "provided null name"}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     * Returns the contents of this <code>ResourceBundle</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * @return the contents of this <code>ResourceBundle</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    public Object[][] getContents() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        return contents;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
}