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 * 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 * This class defines the Extensions attribute for the Certificate. 0N/A * @author Amit Kapoor 0N/A * @author Hemma Prafullchandra 0N/A * Identifier for this attribute, to be used with the 0N/A * get, set, delete methods of Certificate, x509 type. 0N/A * Default constructor. 0N/A * Create the object, decoding the values from the passed DER stream. 0N/A * @param in the DerInputStream to read the Extension from. 0N/A * @exception IOException on decoding errors. 0N/A // Parse the encoded extension 0N/A // ignore errors parsing non-critical extensions 0N/A * Encode the extensions in DER form to the stream, setting 0N/A * the context specific tag as needed in the X.509 v3 certificate. 0N/A * @param out the DerOutputStream to marshal the contents to. 0N/A * @exception CertificateException on encoding errors. 0N/A * @exception IOException on errors. 0N/A * Encode the extensions in DER form to the stream. 0N/A * @param out the DerOutputStream to marshal the contents to. 0N/A * @param isCertReq if true then no context specific tag is added. 0N/A * @exception CertificateException on encoding errors. 0N/A * @exception IOException on errors. 0N/A * Set the attribute value. 0N/A * @param name the extension name used in the cache. 0N/A * @param obj the object to set. 0N/A * @exception IOException if the object could not be cached. 0N/A * Get the attribute value. 0N/A * @param name the extension name used in the lookup. 0N/A * @exception IOException if named extension is not found. 5090N/A // Similar to get(String), but throw no exception, might return null. 5090N/A // Used in X509CertImpl::getExtension(OID). 0N/A * Delete the attribute value. 0N/A * @param name the extension name used in the lookup. 0N/A * @exception IOException if named extension is not found. 0N/A * Return an enumeration of names of attributes existing within this 0N/A * Return a collection view of the extensions. 0N/A * @return a collection view of the extensions in this Certificate. 0N/A * Return the name of this attribute. 0N/A * Return true if a critical extension is found that is 0N/A * not supported, otherwise return false. 0N/A * Compares this CertificateExtensions for equality with the specified 0N/A * object. If the <code>other</code> object is an 0N/A * <code>instanceof</code> <code>CertificateExtensions</code>, then 0N/A * all the entries are compared with the entries from this. 0N/A * @param other the object to test for equality with this 0N/A * CertificateExtensions. 0N/A * @return true iff all the entries match that of the Other, 0N/A for (
int i =
0; i <
len; i++) {
0N/A * Returns a hashcode value for this CertificateExtensions. 0N/A * @return the hashcode value. 0N/A * Returns a string representation of this <tt>CertificateExtensions</tt> 0N/A * object in the form of a set of entries, enclosed in braces and separated 0N/A * by the ASCII characters "<tt>, </tt>" (comma and space). 0N/A * <p>Overrides to <tt>toString</tt> method of <tt>Object</tt>. 0N/A * @return a string representation of this CertificateExtensions. 0N/A // If we cannot find the name, just ignore it 0N/A "Unparseable " +
name +
"extension due to\n" +
why +
"\n\n" +