2362N/A * Copyright (c) 1997, 2006, Oracle and/or its affiliates. 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 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 * 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. 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 0N/A * <p>Abstract class for a revoked certificate in a CRL. 0N/A * This class is for each entry in the <code>revokedCertificates</code>, 0N/A * so it deals with the inner <em>SEQUENCE</em>. 0N/A * The ASN.1 definition for this is: 0N/A * revokedCertificates SEQUENCE OF SEQUENCE { 0N/A * userCertificate CertificateSerialNumber, 0N/A * revocationDate ChoiceOfTime, 0N/A * crlEntryExtensions Extensions OPTIONAL 0N/A * -- if present, must be v2 0N/A * CertificateSerialNumber ::= INTEGER 0N/A * Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension 0N/A * Extension ::= SEQUENCE { 0N/A * extnId OBJECT IDENTIFIER, 0N/A * critical BOOLEAN DEFAULT FALSE, 0N/A * extnValue OCTET STRING 0N/A * -- contains a DER encoding of a value 0N/A * -- of the type registered for use with 0N/A * -- the extnId object identifier value 0N/A * @author Hemma Prafullchandra 0N/A private static final long YR_2050 =
2524636800000L;
0N/A * Constructs a revoked certificate entry using the given 0N/A * serial number and revocation date. 0N/A * @param num the serial number of the revoked certificate. 0N/A * @param date the Date on which revocation took place. 0N/A * Constructs a revoked certificate entry using the given 0N/A * serial number, revocation date and the entry 0N/A * @param num the serial number of the revoked certificate. 0N/A * @param date the Date on which revocation took place. 0N/A * @param crlEntryExts the extensions for this entry. 0N/A * Unmarshals a revoked certificate from its encoded form. 0N/A * @param revokedCert the encoded bytes. 0N/A * @exception CRLException on parsing errors. 0N/A * Unmarshals a revoked certificate from its encoded form. 0N/A * @param derVal the DER value containing the revoked certificate. 0N/A * @exception CRLException on parsing errors. 0N/A * Returns true if this revoked certificate entry has 0N/A * extensions, otherwise false. 0N/A * @return true if this CRL entry has extensions, otherwise 0N/A * Encodes the revoked certificate to an output stream. 0N/A * @param outStrm an output stream to which the encoded revoked 0N/A * certificate is written. 0N/A * @exception CRLException on encoding errors. 0N/A // sequence { serialNumber, revocationDate, extensions } 0N/A * Returns the ASN.1 DER-encoded form of this CRL Entry, 0N/A * which corresponds to the inner SEQUENCE. 0N/A * @exception CRLException if an encoding error occurs. 5090N/A // Called internally to avoid clone 0N/A * Gets the serial number from this X509CRLEntry, 0N/A * i.e. the <em>userCertificate</em>. 0N/A * @return the serial number. 0N/A * Gets the revocation date from this X509CRLEntry, 0N/A * the <em>revocationDate</em>. 0N/A * @return the revocation date. 0N/A * This method is the overridden implementation of the getRevocationReason 0N/A * method in X509CRLEntry. It is better performance-wise since it returns 0N/A * This static method is the default implementation of the 0N/A * getRevocationReason method in X509CRLEntry. 0N/A * get Reason Code from CRL entry. 0N/A * @returns Integer or null, if no such extension 0N/A * @throws IOException on error 0N/A * Returns a printable string of this revoked certificate. 0N/A * @return value of this revoked certificate in a printable form. 0N/A +
"DER encoded OCTET string =\n" 0N/A * Return true if a critical extension is found that is 0N/A * not supported, otherwise return false. 0N/A * Gets a Set of the extension(s) marked CRITICAL in this 0N/A * X509CRLEntry. In the returned set, each extension is 0N/A * represented by its OID string. 0N/A * @return a set of the extension oid strings in the 0N/A * Object that are marked critical. 0N/A * Gets a Set of the extension(s) marked NON-CRITICAL in this 0N/A * X509CRLEntry. In the returned set, each extension is 0N/A * represented by its OID string. 0N/A * @return a set of the extension oid strings in the 0N/A * Object that are marked critical. 0N/A * Gets the DER encoded OCTET string for the extension value 0N/A * (<em>extnValue</em>) identified by the passed in oid String. 0N/A * The <code>oid</code> string is 0N/A * represented by a set of positive whole number separated 0N/A * by ".", that means,<br> 0N/A * <positive whole number>.<positive whole number>.<positive 0N/A * whole number>.<...> 0N/A * @param oid the Object Identifier value for the extension. 0N/A * @return the DER encoded octet string of the extension value. 0N/A * @param oid ObjectIdentifier of extension desired 0N/A * @returns Extension of type <extension> or null, if not found 0N/A // following returns null if no such OID in map 0N/A //XXX consider cloning this 0N/A "starting sequence tag missing.");
0N/A return;
// no extensions 0N/A // crlEntryExtensions 0N/A * Utility method to convert an arbitrary instance of X509CRLEntry 0N/A * to a X509CRLEntryImpl. Does a cast if possible, otherwise reparses 0N/A * Returns the CertificateIssuerExtension 0N/A * @return the CertificateIssuerExtension, or null if it does not exist 5090N/A * Returns all extensions for this entry in a map 5090N/A * @return the extension map, can be empty, but not null