0N/A/*
2362N/A * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage sun.security.x509;
0N/A
0N/Aimport java.io.*;
0N/A
0N/Aimport sun.security.util.*;
0N/A
0N/A/**
0N/A * Lists all the object identifiers of the X509 extensions of the PKIX profile.
0N/A *
0N/A * <p>Extensions are addiitonal attributes which can be inserted in a X509
0N/A * v3 certificate. For example a "Driving License Certificate" could have
0N/A * the driving license number as a extension.
0N/A *
0N/A * <p>Extensions are represented as a sequence of the extension identifier
0N/A * (Object Identifier), a boolean flag stating whether the extension is to
0N/A * be treated as being critical and the extension value itself (this is again
0N/A * a DER encoding of the extension value).
0N/A *
0N/A * @see Extension
0N/A *
0N/A *
0N/A * @author Amit Kapoor
0N/A * @author Hemma Prafullchandra
0N/A */
0N/Apublic class PKIXExtensions {
0N/A // The object identifiers
0N/A private static final int AuthorityKey_data [] = { 2, 5, 29, 35 };
0N/A private static final int SubjectKey_data [] = { 2, 5, 29, 14 };
0N/A private static final int KeyUsage_data [] = { 2, 5, 29, 15 };
0N/A private static final int PrivateKeyUsage_data [] = { 2, 5, 29, 16 };
0N/A private static final int CertificatePolicies_data [] = { 2, 5, 29, 32 };
0N/A private static final int PolicyMappings_data [] = { 2, 5, 29, 33 };
0N/A private static final int SubjectAlternativeName_data [] = { 2, 5, 29, 17 };
0N/A private static final int IssuerAlternativeName_data [] = { 2, 5, 29, 18 };
0N/A private static final int SubjectDirectoryAttributes_data [] = { 2, 5, 29, 9 };
0N/A private static final int BasicConstraints_data [] = { 2, 5, 29, 19 };
0N/A private static final int NameConstraints_data [] = { 2, 5, 29, 30 };
0N/A private static final int PolicyConstraints_data [] = { 2, 5, 29, 36 };
0N/A private static final int CRLDistributionPoints_data [] = { 2, 5, 29, 31 };
0N/A private static final int CRLNumber_data [] = { 2, 5, 29, 20 };
0N/A private static final int IssuingDistributionPoint_data [] = { 2, 5, 29, 28 };
0N/A private static final int DeltaCRLIndicator_data [] = { 2, 5, 29, 27 };
0N/A private static final int ReasonCode_data [] = { 2, 5, 29, 21 };
0N/A private static final int HoldInstructionCode_data [] = { 2, 5, 29, 23 };
0N/A private static final int InvalidityDate_data [] = { 2, 5, 29, 24 };
0N/A private static final int ExtendedKeyUsage_data [] = { 2, 5, 29, 37 };
0N/A private static final int InhibitAnyPolicy_data [] = { 2, 5, 29, 54 };
0N/A private static final int CertificateIssuer_data [] = { 2, 5, 29, 29 };
0N/A private static final int AuthInfoAccess_data [] = { 1, 3, 6, 1, 5, 5, 7, 1, 1};
0N/A private static final int SubjectInfoAccess_data [] = { 1, 3, 6, 1, 5, 5, 7, 1, 11};
0N/A private static final int FreshestCRL_data [] = { 2, 5, 29, 46 };
951N/A private static final int OCSPNoCheck_data [] = { 1, 3, 6, 1, 5, 5, 7,
951N/A 48, 1, 5};
0N/A
0N/A /**
0N/A * Identifies the particular public key used to sign the certificate.
0N/A */
0N/A public static final ObjectIdentifier AuthorityKey_Id;
0N/A
0N/A /**
0N/A * Identifies the particular public key used in an application.
0N/A */
0N/A public static final ObjectIdentifier SubjectKey_Id;
0N/A
0N/A /**
0N/A * Defines the purpose of the key contained in the certificate.
0N/A */
0N/A public static final ObjectIdentifier KeyUsage_Id;
0N/A
0N/A /**
0N/A * Allows the certificate issuer to specify a different validity period
0N/A * for the private key than the certificate.
0N/A */
0N/A public static final ObjectIdentifier PrivateKeyUsage_Id;
0N/A
0N/A /**
0N/A * Contains the sequence of policy information terms.
0N/A */
0N/A public static final ObjectIdentifier CertificatePolicies_Id;
0N/A
0N/A /**
0N/A * Lists pairs of objectidentifiers of policies considered equivalent by the
0N/A * issuing CA to the subject CA.
0N/A */
0N/A public static final ObjectIdentifier PolicyMappings_Id;
0N/A
0N/A /**
0N/A * Allows additional identities to be bound to the subject of the certificate.
0N/A */
0N/A public static final ObjectIdentifier SubjectAlternativeName_Id;
0N/A
0N/A /**
0N/A * Allows additional identities to be associated with the certificate issuer.
0N/A */
0N/A public static final ObjectIdentifier IssuerAlternativeName_Id;
0N/A
0N/A /**
0N/A * Identifies additional directory attributes.
0N/A * This extension is always non-critical.
0N/A */
0N/A public static final ObjectIdentifier SubjectDirectoryAttributes_Id;
0N/A
0N/A /**
0N/A * Identifies whether the subject of the certificate is a CA and how deep
0N/A * a certification path may exist through that CA.
0N/A */
0N/A public static final ObjectIdentifier BasicConstraints_Id;
0N/A
0N/A /**
0N/A * Provides for permitted and excluded subtrees that place restrictions
0N/A * on names that may be included within a certificate issued by a given CA.
0N/A */
0N/A public static final ObjectIdentifier NameConstraints_Id;
0N/A
0N/A /**
0N/A * Used to either prohibit policy mapping or limit the set of policies
0N/A * that can be in subsequent certificates.
0N/A */
0N/A public static final ObjectIdentifier PolicyConstraints_Id;
0N/A
0N/A /**
0N/A * Identifies how CRL information is obtained.
0N/A */
0N/A public static final ObjectIdentifier CRLDistributionPoints_Id;
0N/A
0N/A /**
0N/A * Conveys a monotonically increasing sequence number for each CRL
0N/A * issued by a given CA.
0N/A */
0N/A public static final ObjectIdentifier CRLNumber_Id;
0N/A
0N/A /**
0N/A * Identifies the CRL distribution point for a particular CRL.
0N/A */
0N/A public static final ObjectIdentifier IssuingDistributionPoint_Id;
0N/A
0N/A /**
0N/A * Identifies the delta CRL.
0N/A */
0N/A public static final ObjectIdentifier DeltaCRLIndicator_Id;
0N/A
0N/A /**
0N/A * Identifies the reason for the certificate revocation.
0N/A */
0N/A public static final ObjectIdentifier ReasonCode_Id;
0N/A
0N/A /**
0N/A * This extension provides a registered instruction identifier indicating
0N/A * the action to be taken, after encountering a certificate that has been
0N/A * placed on hold.
0N/A */
0N/A public static final ObjectIdentifier HoldInstructionCode_Id;
0N/A
0N/A /**
0N/A * Identifies the date on which it is known or suspected that the private
0N/A * key was compromised or that the certificate otherwise became invalid.
0N/A */
0N/A public static final ObjectIdentifier InvalidityDate_Id;
0N/A /**
0N/A * Identifies one or more purposes for which the certified public key
0N/A * may be used, in addition to or in place of the basic purposes
0N/A * indicated in the key usage extension field.
0N/A */
0N/A public static final ObjectIdentifier ExtendedKeyUsage_Id;
0N/A
0N/A /**
0N/A * Specifies whether any-policy policy OID is permitted
0N/A */
0N/A public static final ObjectIdentifier InhibitAnyPolicy_Id;
0N/A
0N/A /**
0N/A * Identifies the certificate issuer associated with an entry in an
0N/A * indirect CRL.
0N/A */
0N/A public static final ObjectIdentifier CertificateIssuer_Id;
0N/A
0N/A /**
0N/A * This extension indicates how to access CA information and services for
0N/A * the issuer of the certificate in which the extension appears.
0N/A * This information may be used for on-line certification validation
0N/A * services.
0N/A */
0N/A public static final ObjectIdentifier AuthInfoAccess_Id;
0N/A
0N/A /**
0N/A * This extension indicates how to access CA information and services for
0N/A * the subject of the certificate in which the extension appears.
0N/A */
0N/A public static final ObjectIdentifier SubjectInfoAccess_Id;
0N/A
0N/A /**
0N/A * Identifies how delta CRL information is obtained.
0N/A */
0N/A public static final ObjectIdentifier FreshestCRL_Id;
0N/A
951N/A /**
951N/A * Identifies the OCSP client can trust the responder for the
951N/A * lifetime of the responder's certificate.
951N/A */
951N/A public static final ObjectIdentifier OCSPNoCheck_Id;
951N/A
0N/A static {
0N/A AuthorityKey_Id = ObjectIdentifier.newInternal(AuthorityKey_data);
0N/A SubjectKey_Id = ObjectIdentifier.newInternal(SubjectKey_data);
0N/A KeyUsage_Id = ObjectIdentifier.newInternal(KeyUsage_data);
0N/A PrivateKeyUsage_Id = ObjectIdentifier.newInternal(PrivateKeyUsage_data);
0N/A CertificatePolicies_Id =
0N/A ObjectIdentifier.newInternal(CertificatePolicies_data);
0N/A PolicyMappings_Id = ObjectIdentifier.newInternal(PolicyMappings_data);
0N/A SubjectAlternativeName_Id =
0N/A ObjectIdentifier.newInternal(SubjectAlternativeName_data);
0N/A IssuerAlternativeName_Id =
0N/A ObjectIdentifier.newInternal(IssuerAlternativeName_data);
0N/A ExtendedKeyUsage_Id = ObjectIdentifier.newInternal(ExtendedKeyUsage_data);
0N/A InhibitAnyPolicy_Id = ObjectIdentifier.newInternal(InhibitAnyPolicy_data);
0N/A SubjectDirectoryAttributes_Id =
0N/A ObjectIdentifier.newInternal(SubjectDirectoryAttributes_data);
0N/A BasicConstraints_Id =
0N/A ObjectIdentifier.newInternal(BasicConstraints_data);
0N/A ReasonCode_Id = ObjectIdentifier.newInternal(ReasonCode_data);
0N/A HoldInstructionCode_Id =
0N/A ObjectIdentifier.newInternal(HoldInstructionCode_data);
0N/A InvalidityDate_Id = ObjectIdentifier.newInternal(InvalidityDate_data);
0N/A
0N/A NameConstraints_Id = ObjectIdentifier.newInternal(NameConstraints_data);
0N/A PolicyConstraints_Id =
0N/A ObjectIdentifier.newInternal(PolicyConstraints_data);
0N/A CRLDistributionPoints_Id =
0N/A ObjectIdentifier.newInternal(CRLDistributionPoints_data);
0N/A CRLNumber_Id =
0N/A ObjectIdentifier.newInternal(CRLNumber_data);
0N/A IssuingDistributionPoint_Id =
0N/A ObjectIdentifier.newInternal(IssuingDistributionPoint_data);
0N/A DeltaCRLIndicator_Id =
0N/A ObjectIdentifier.newInternal(DeltaCRLIndicator_data);
0N/A CertificateIssuer_Id =
0N/A ObjectIdentifier.newInternal(CertificateIssuer_data);
0N/A AuthInfoAccess_Id =
0N/A ObjectIdentifier.newInternal(AuthInfoAccess_data);
0N/A SubjectInfoAccess_Id =
0N/A ObjectIdentifier.newInternal(SubjectInfoAccess_data);
0N/A FreshestCRL_Id = ObjectIdentifier.newInternal(FreshestCRL_data);
951N/A OCSPNoCheck_Id = ObjectIdentifier.newInternal(OCSPNoCheck_data);
0N/A }
0N/A}