IssuingDistributionPointExtension.java revision 0
0N/A * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 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 0N/A * published by the Free Software Foundation. Sun designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Sun in the LICENSE file that accompanied this code. 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 * 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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A * Represents the CRL Issuing Distribution Point Extension (OID = 2.5.29.28). 0N/A * The issuing distribution point is a critical CRL extension that 0N/A * identifies the CRL distribution point and scope for a particular CRL, 0N/A * and it indicates whether the CRL covers revocation for end entity 0N/A * certificates only, CA certificates only, attribute certificates only, 0N/A * or a limited set of reason codes. 0N/A * The extension is defined in Section 5.2.5 of 0N/Aate and Certificate Revocation List (CRL) Profile</a>. 0N/A * Its ASN.1 definition is as follows: 0N/A * id-ce-issuingDistributionPoint OBJECT IDENTIFIER ::= { id-ce 28 } 0N/A * issuingDistributionPoint ::= SEQUENCE { 0N/A * distributionPoint [0] DistributionPointName OPTIONAL, 0N/A * onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE, 0N/A * onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE, 0N/A * onlySomeReasons [3] ReasonFlags OPTIONAL, 0N/A * indirectCRL [4] BOOLEAN DEFAULT FALSE, 0N/A * onlyContainsAttributeCerts [5] BOOLEAN DEFAULT FALSE } 0N/A * @see DistributionPoint 0N/A * Identifier for this attribute, to be used with the 0N/A * get, set, delete methods of Certificate, x509 type. 0N/A "x509.info.extensions.IssuingDistributionPoint";
0N/A * The distribution point name for the CRL. 0N/A * The scope settings for the CRL. 0N/A * ASN.1 context specific tag values 0N/A * Creates a critical IssuingDistributionPointExtension. 0N/A * @param distributionPoint the name of the distribution point, or null for 0N/A * @param revocationReasons the revocation reasons associated with the 0N/A * distribution point, or null for none. 0N/A * @param hasOnlyUserCerts if <code>true</code> then scope of the CRL 0N/A * includes only user certificates. 0N/A * @param hasOnlyCACerts if <code>true</code> then scope of the CRL 0N/A * includes only CA certificates. 0N/A * @param hasOnlyAttributeCerts if <code>true</code> then scope of the CRL 0N/A * includes only attribute certificates. 0N/A * @param isIndirectCRL if <code>true</code> then the scope of the CRL 0N/A * includes certificates issued by authorities other than the CRL 0N/A * issuer. The responsible authority is indicated by a certificate 0N/A * issuer CRL entry extension. 0N/A * @throws IllegalArgumentException if more than one of 0N/A * <code>hasOnlyUserCerts</code>, <code>hasOnlyCACerts</code>, 0N/A * <code>hasOnlyAttributeCerts</code> is set to <code>true</code>. 0N/A * @throws IOException on encoding error. 0N/A "Only one of hasOnlyUserCerts, hasOnlyCACerts, " +
0N/A "hasOnlyAttributeCerts may be set to true");
0N/A * Creates a critical IssuingDistributionPointExtension from its 0N/A * @param critical true if the extension is to be treated as critical. 0N/A * @param value the DER-encoded value. It must be a <code>byte[]</code>. 0N/A * @exception IOException on decoding error. 0N/A "IssuingDistributionPointExtension.");
0N/A // All the elements in issuingDistributionPoint are optional 0N/A (
"Invalid encoding of IssuingDistributionPoint");
0N/A * Returns the name of this attribute. 0N/A * Encodes the issuing distribution point extension and writes it to the 0N/A * @param out the output stream. 0N/A * @exception IOException on encoding error. 0N/A * Sets the attribute value. 0N/A "Attribute value should be of type DistributionPointName.");
0N/A "Attribute value should be of type ReasonFlags.");
0N/A "Attribute value should be of type Boolean.");
0N/A "Attribute value should be of type Boolean.");
0N/A "Attribute value should be of type Boolean.");
0N/A "Attribute value should be of type Boolean.");
0N/A "] not recognized by " +
0N/A "CertAttrSet:IssuingDistributionPointExtension.");
0N/A * Gets the attribute value. 0N/A "] not recognized by " +
0N/A "CertAttrSet:IssuingDistributionPointExtension.");
0N/A * Deletes the attribute value. 0N/A "] not recognized by " +
0N/A "CertAttrSet:IssuingDistributionPointExtension.");
0N/A * Returns an enumeration of names of attributes existing within this 0N/A // Encodes this extension value 0N/A * Returns the extension as user readable string. 0N/A ? (
" Only contains user certs: true")
0N/A : (
" Only contains user certs: false")).
append(
"\n");
0N/A ? (
" Only contains CA certs: true")
0N/A : (
" Only contains CA certs: false")).
append(
"\n");
0N/A ? (
" Only contains attribute certs: true")
0N/A : (
" Only contains attribute certs: false")).
append(
"\n");
0N/A ? (
" Indirect CRL: true")