2362N/A * Copyright (c) 2000, 2002, 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 represents an X.509 Certificate Pair object, which is primarily 0N/A * used to hold a pair of cross certificates issued between Certification 0N/A * Authorities. The ASN.1 structure is listed below. The forward certificate 0N/A * of the CertificatePair contains a certificate issued to this CA by another 0N/A * CA. The reverse certificate of the CertificatePair contains a certificate 0N/A * issued by this CA to another CA. When both the forward and the reverse 0N/A * certificates are present in the CertificatePair, the issuer name in one 0N/A * certificate shall match the subject name in the other and vice versa, and 0N/A * the subject public key in one certificate shall be capable of verifying the 0N/A * digital signature on the other certificate and vice versa. If a subject 0N/A * public key in one certificate does not contain required key algorithm 0N/A * parameters, then the signature check involving that key is not done.<p> 0N/A * The ASN.1 syntax for this object is: 0N/A * CertificatePair ::= SEQUENCE { 0N/A * forward [0] Certificate OPTIONAL, 0N/A * reverse [1] Certificate OPTIONAL 0N/A * -- at least one of the pair shall be present -- } 0N/A * This structure uses EXPLICIT tagging. References: Annex A of 0N/A * X.509(2000), X.509(1997). 0N/A * @author Sean Mullan 0N/A /* ASN.1 explicit tags */ 0N/A * Creates an empty instance of X509CertificatePair. 0N/A * Creates an instance of X509CertificatePair. At least one of 0N/A * the pair must be non-null. 0N/A * @param forward The forward component of the certificate pair 0N/A * which represents a certificate issued to this CA by other CAs. 0N/A * @param reverse The reverse component of the certificate pair 0N/A * which represents a certificate issued by this CA to other CAs. 0N/A * @throws CertificateException If an exception occurs. 0N/A +
"must be non-null");
0N/A * Create a new X509CertificatePair from its encoding. 0N/A * For internal use only, external code should use generateCertificatePair. 0N/A * Clear the cache for debugging. 0N/A * Create a X509CertificatePair from its encoding. Uses cache lookup 0N/A * Sets the forward component of the certificate pair. 0N/A * Sets the reverse component of the certificate pair. 0N/A * Returns the forward component of the certificate pair. 0N/A * @return The forward certificate, or null if not set. 0N/A * Returns the reverse component of the certificate pair. 0N/A * @return The reverse certificate, or null if not set. 0N/A * Return the DER encoded form of the certificate pair. 0N/A * @return The encoded form of the certificate pair. 0N/A * @throws CerticateEncodingException If an encoding exception occurs. 0N/A * Return a printable representation of the certificate pair. 0N/A * @return A String describing the contents of the pair. 0N/A /* Parse the encoded bytes */ 0N/A (
"Sequence tag missing for X509CertificatePair");
0N/A +
"certificate in X509CertificatePair");
0N/A +
"certificate in X509CertificatePair");
0N/A +
"X509CertificatePair");
0N/A +
"must be non-null");
0N/A /* Translate to encoded bytes */ 0N/A * Check for a valid certificate pair 0N/A /* if either of pair is missing, return w/o error */ 0N/A * If both elements of the pair are present, check that they 0N/A +
"forward and reverse certificates do not match");
0N/A /* check signatures unless key parameters are missing */