2938N/A * Copyright (c) 2007, 2010, 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 * An exception that indicates an X.509 certificate is revoked. A 0N/A * <code>CertificateRevokedException</code> contains additional information 0N/A * about the revoked certificate, such as the date on which the 0N/A * certificate was revoked and the reason it was revoked. 0N/A * @author Sean Mullan 0N/A * @see CertPathValidatorException 0N/A * @serial the date on which the certificate was revoked 0N/A * @serial the revocation reason 2938N/A * @serial the <code>X500Principal</code> that represents the name of the 2938N/A * authority that signed the certificate's revocation status information 0N/A * Constructs a <code>CertificateRevokedException</code> with 0N/A * the specified revocation date, reason code, authority name, and map 0N/A * @param revocationDate the date on which the certificate was revoked. The 0N/A * date is copied to protect against subsequent modification. 0N/A * @param reason the revocation reason 0N/A * @param extensions a map of X.509 Extensions. Each key is an OID String 0N/A * that maps to the corresponding Extension. The map is copied to 0N/A * prevent subsequent modification. 2938N/A * @param authority the <code>X500Principal</code> that represents the name 2938N/A * of the authority that signed the certificate's revocation status 0N/A * @throws NullPointerException if <code>revocationDate</code>, 0N/A * <code>reason</code>, <code>authority</code>, or 0N/A * <code>extensions</code> is <code>null</code> 0N/A * Returns the date on which the certificate was revoked. A new copy is 0N/A * returned each time the method is invoked to protect against subsequent 0N/A * @return the revocation date 0N/A * Returns the reason the certificate was revoked. 0N/A * @return the revocation reason 0N/A * Returns the name of the authority that signed the certificate's 0N/A * revocation status information. 2938N/A * @return the <code>X500Principal</code> that represents the name of the 2938N/A * authority that signed the certificate's revocation status information 0N/A * Returns the invalidity date, as specifed in the Invalidity Date 0N/A * extension of this <code>CertificateRevokedException</code>. The 0N/A * invalidity date is the date on which it is known or suspected that the 0N/A * private key was compromised or that the certificate otherwise became 0N/A * invalid. This implementation calls <code>getExtensions()</code> and 0N/A * checks the returned map for an entry for the Invalidity Date extension 0N/A * OID ("2.5.29.24"). If found, it returns the invalidity date in the 0N/A * extension; otherwise null. A new Date object is returned each time the 0N/A * method is invoked to protect against subsequent modification. 0N/A * @return the invalidity date, or <code>null</code> if not specified 0N/A * Returns a map of X.509 extensions containing additional information 0N/A * about the revoked certificate, such as the Invalidity Date 0N/A * Extension. Each key is an OID String that maps to the corresponding 0N/A * @return an unmodifiable map of X.509 extensions, or an empty map 0N/A * if there are no extensions 0N/A return "Certificate has been revoked, reason: " 0N/A * Serialize this <code>CertificateRevokedException</code> instance. 0N/A * @serialData the size of the extensions map (int), followed by all of 0N/A * the extensions in the map, in no particular order. For each extension, 0N/A * the following data is emitted: the OID String (Object), the criticality 0N/A * flag (boolean), the length of the encoded extension value byte array 0N/A * (int), and the encoded extension value bytes. 0N/A // Write out the non-transient fields 0N/A // (revocationDate, reason, authority) 0N/A // Write out the size (number of mappings) of the extensions map 0N/A // For each extension in the map, the following are emitted (in order): 0N/A // the OID String (Object), the criticality flag (boolean), the length 0N/A // of the encoded extension value byte array (int), and the encoded 0N/A // extension value byte array. The extensions themselves are emitted 0N/A // in no particular order. 0N/A * Deserialize the <code>CertificateRevokedException</code> instance. 0N/A // Read in the non-transient fields 0N/A // (revocationDate, reason, authority) 0N/A // Defensively copy the revocation date 0N/A // Read in the size (number of mappings) of the extensions map 0N/A // and create the extensions map 0N/A // Read in the extensions and put the mappings in the extensions map