1 /*
   2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.security.util;
  27 
  28 /**
  29  * This class represents the <code>ResourceBundle</code>
  30  * for javax.security.auth and sun.security.
  31  *
  32  */
  33 public class Resources extends java.util.ListResourceBundle {
  34 
  35     private static final Object[][] contents = {
  36 
  37         // javax.security.auth.PrivateCredentialPermission
  38         {"invalid.null.input.s.", "invalid null input(s)"},
  39         {"actions.can.only.be.read.", "actions can only be 'read'"},
  40         {"permission.name.name.syntax.invalid.",
  41                 "permission name [{0}] syntax invalid: "},
  42         {"Credential.Class.not.followed.by.a.Principal.Class.and.Name",
  43                 "Credential Class not followed by a Principal Class and Name"},
  44         {"Principal.Class.not.followed.by.a.Principal.Name",
  45                 "Principal Class not followed by a Principal Name"},
  46         {"Principal.Name.must.be.surrounded.by.quotes",
  47                 "Principal Name must be surrounded by quotes"},
  48         {"Principal.Name.missing.end.quote",
  49                 "Principal Name missing end quote"},
  50         {"PrivateCredentialPermission.Principal.Class.can.not.be.a.wildcard.value.if.Principal.Name.is.not.a.wildcard.value",
  51                 "PrivateCredentialPermission Principal Class can not be a wildcard (*) value if Principal Name is not a wildcard (*) value"},
  52         {"CredOwner.Principal.Class.class.Principal.Name.name",
  53                 "CredOwner:\n\tPrincipal Class = {0}\n\tPrincipal Name = {1}"},
  54 
  55         // javax.security.auth.x500
  56         {"provided.null.name", "provided null name"},
  57         {"provided.null.keyword.map", "provided null keyword map"},
  58         {"provided.null.OID.map", "provided null OID map"},
  59 
  60         // javax.security.auth.Subject
  61         {"NEWLINE", "\n"},
  62         {"invalid.null.AccessControlContext.provided",
  63                 "invalid null AccessControlContext provided"},
  64         {"invalid.null.action.provided", "invalid null action provided"},
  65         {"invalid.null.Class.provided", "invalid null Class provided"},
  66         {"Subject.", "Subject:\n"},
  67         {".Principal.", "\tPrincipal: "},
  68         {".Public.Credential.", "\tPublic Credential: "},
  69         {".Private.Credential.", "\tPrivate Credential: "},
  70         {".Private.Credential.inaccessible.",
  71                 "\tPrivate Credential inaccessible\n"},
  72         {"Subject.is.read.only", "Subject is read-only"},
  73         {"attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set",
  74                 "attempting to add an object which is not an instance of java.security.Principal to a Subject's Principal Set"},
  75         {"attempting.to.add.an.object.which.is.not.an.instance.of.class",
  76                 "attempting to add an object which is not an instance of {0}"},
  77 
  78         // javax.security.auth.login.AppConfigurationEntry
  79         {"LoginModuleControlFlag.", "LoginModuleControlFlag: "},
  80 
  81         // javax.security.auth.login.LoginContext
  82         {"Invalid.null.input.name", "Invalid null input: name"},
  83         {"No.LoginModules.configured.for.name",
  84          "No LoginModules configured for {0}"},
  85         {"invalid.null.Subject.provided", "invalid null Subject provided"},
  86         {"invalid.null.CallbackHandler.provided",
  87                 "invalid null CallbackHandler provided"},
  88         {"null.subject.logout.called.before.login",
  89                 "null subject - logout called before login"},
  90         {"Login.Failure.all.modules.ignored",
  91                 "Login Failure: all modules ignored"},
  92 
  93         // sun.security.provider.PolicyFile
  94 
  95         {"java.security.policy.error.parsing.policy.message",
  96                 "java.security.policy: error parsing {0}:\n\t{1}"},
  97         {"java.security.policy.error.adding.Permission.perm.message",
  98                 "java.security.policy: error adding Permission, {0}:\n\t{1}"},
  99         {"java.security.policy.error.adding.Entry.message",
 100                 "java.security.policy: error adding Entry:\n\t{0}"},
 101         {"alias.name.not.provided.pe.name.", "alias name not provided ({0})"},
 102         {"unable.to.perform.substitution.on.alias.suffix",
 103                 "unable to perform substitution on alias, {0}"},
 104         {"substitution.value.prefix.unsupported",
 105                 "substitution value, {0}, unsupported"},
 106         {"SPACE", " "},
 107         {"LPARAM", "("},
 108         {"RPARAM", ")"},
 109         {"type.can.t.be.null","type can't be null"},
 110 
 111         // sun.security.provider.PolicyParser
 112         {"keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore",
 113                 "keystorePasswordURL can not be specified without also specifying keystore"},
 114         {"expected.keystore.type", "expected keystore type"},
 115         {"expected.keystore.provider", "expected keystore provider"},
 116         {"multiple.Codebase.expressions",
 117                 "multiple Codebase expressions"},
 118         {"multiple.SignedBy.expressions","multiple SignedBy expressions"},
 119         {"duplicate.keystore.domain.name","duplicate keystore domain name: {0}"},
 120         {"duplicate.keystore.name","duplicate keystore name: {0}"},
 121         {"SignedBy.has.empty.alias","SignedBy has empty alias"},
 122         {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
 123                 "can not specify Principal with a wildcard class without a wildcard name"},
 124         {"expected.codeBase.or.SignedBy.or.Principal",
 125                 "expected codeBase or SignedBy or Principal"},
 126         {"expected.permission.entry", "expected permission entry"},
 127         {"number.", "number "},
 128         {"expected.expect.read.end.of.file.",
 129                 "expected [{0}], read [end of file]"},
 130         {"expected.read.end.of.file.",
 131                 "expected [;], read [end of file]"},
 132         {"line.number.msg", "line {0}: {1}"},
 133         {"line.number.expected.expect.found.actual.",
 134                 "line {0}: expected [{1}], found [{2}]"},
 135         {"null.principalClass.or.principalName",
 136                 "null principalClass or principalName"},
 137 
 138         // sun.security.pkcs11.SunPKCS11
 139         {"PKCS11.Token.providerName.Password.",
 140                 "PKCS11 Token [{0}] Password: "},
 141     };
 142 
 143 
 144     /**
 145      * Returns the contents of this <code>ResourceBundle</code>.
 146      *
 147      * @return the contents of this <code>ResourceBundle</code>.
 148      */
 149     @Override
 150     public Object[][] getContents() {
 151         return contents;
 152     }
 153 }
 154