/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* This class defines the mapping from OID & name to classes and vice
* versa. Used by CertificateExtensions & PKCS10 to get the java
*
* @author Amit Kapoor
* @author Hemma Prafullchandra
* @author Andreas Sterbenz
*
*/
public class OIDMap {
private OIDMap() {
// empty
}
// "user-friendly" names
private static final int NetscapeCertType_data[] =
{ 2, 16, 840, 1, 113730, 1, 1 };
/** Map ObjectIdentifier(oid) -> OIDInfo(info) */
/** Map String(friendly name) -> OIDInfo(info) */
static {
"sun.security.x509.SubjectKeyIdentifierExtension");
"sun.security.x509.KeyUsageExtension");
"sun.security.x509.PrivateKeyUsageExtension");
"sun.security.x509.SubjectAlternativeNameExtension");
"sun.security.x509.IssuerAlternativeNameExtension");
"sun.security.x509.BasicConstraintsExtension");
"sun.security.x509.CRLNumberExtension");
"sun.security.x509.CRLReasonCodeExtension");
"sun.security.x509.NameConstraintsExtension");
"sun.security.x509.PolicyMappingsExtension");
"sun.security.x509.AuthorityKeyIdentifierExtension");
"sun.security.x509.PolicyConstraintsExtension");
(new int[] {2,16,840,1,113730,1,1}),
"sun.security.x509.NetscapeCertTypeExtension");
"sun.security.x509.CertificatePoliciesExtension");
"sun.security.x509.ExtendedKeyUsageExtension");
"sun.security.x509.InhibitAnyPolicyExtension");
"sun.security.x509.CRLDistributionPointsExtension");
"sun.security.x509.CertificateIssuerExtension");
"sun.security.x509.SubjectInfoAccessExtension");
"sun.security.x509.AuthorityInfoAccessExtension");
"sun.security.x509.IssuingDistributionPointExtension");
"sun.security.x509.DeltaCRLIndicatorExtension");
"sun.security.x509.FreshestCRLExtension");
"sun.security.x509.OCSPNoCheckExtension");
}
/**
* Add attributes to the table. For internal use in the static
* initializer.
*/
}
/**
* Inner class encapsulating the mapping info and Class loading.
*/
private static class OIDInfo {
}
}
/**
* Return the Class object associated with this attribute.
*/
try {
if (c == null) {
clazz = c;
}
return c;
} catch (ClassNotFoundException e) {
throw (CertificateException)new CertificateException
("Could not load class: " + e).initCause(e);
}
}
}
/**
* Add a name to lookup table.
*
* @param name the name of the attr
* @param oid the string representation of the object identifier for
* the class.
* @param clazz the Class object associated with this attribute
* @exception CertificateException on errors.
*/
throws CertificateException {
try {
} catch (IOException ioe) {
throw new CertificateException
("Invalid Object identifier: " + oid);
}
throw new CertificateException
("Object identifier already exists: " + oid);
}
}
}
/**
* Return user friendly name associated with the OID.
*
* @param oid the name of the object identifier to be returned.
* @return the user friendly name or null if no name
* is registered for this oid.
*/
}
/**
* Return Object identifier for user friendly name.
*
* @param name the user friendly name.
* @return the Object Identifier or null if no oid
* is registered for this name.
*/
}
/**
* Return the java class object associated with the user friendly name.
*
* @param name the user friendly name.
* @exception CertificateException if class cannot be instantiated.
*/
}
/**
* Return the java class object associated with the object identifier.
*
* @param oid the name of the object identifier to be returned.
* @exception CertificateException if class cannot be instatiated.
*/
throws CertificateException {
}
}