Path: blob/master/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilderResult.java
41161 views
/*1* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package sun.security.provider.certpath;2627import sun.security.util.Debug;28import java.security.PublicKey;29import java.security.cert.CertPath;30import java.security.cert.PKIXCertPathBuilderResult;31import java.security.cert.PolicyNode;32import java.security.cert.TrustAnchor;3334/**35* This class represents the result of a SunCertPathBuilder build.36* Since all paths returned by the SunCertPathProvider are PKIX validated37* the result contains the valid policy tree and subject public key returned38* by the algorithm. It also contains the trust anchor and debug information39* represented in the form of an adjacency list.40*41* @see PKIXCertPathBuilderResult42*43* @since 1.444* @author Sean Mullan45*/46//@@@ Note: this class is not in public API and access to adjacency list is47//@@@ intended for debugging/replay of Sun PKIX CertPathBuilder implementation.4849public class SunCertPathBuilderResult extends PKIXCertPathBuilderResult {5051private static final Debug debug = Debug.getInstance("certpath");5253private AdjacencyList adjList;5455/**56* Creates a SunCertPathBuilderResult instance.57*58* @param certPath the validated <code>CertPath</code>59* @param trustAnchor a <code>TrustAnchor</code> describing the CA that60* served as a trust anchor for the certification path61* @param policyTree the valid policy tree, or <code>null</code>62* if there are no valid policies63* @param subjectPublicKey the public key of the subject64* @param adjList an Adjacency list containing debug information65*/66SunCertPathBuilderResult(CertPath certPath,67TrustAnchor trustAnchor, PolicyNode policyTree,68PublicKey subjectPublicKey, AdjacencyList adjList)69{70super(certPath, trustAnchor, policyTree, subjectPublicKey);71this.adjList = adjList;72}7374/**75* Returns the adjacency list containing information about the build.76*77* @return The adjacency list containing information about the build.78*/79public AdjacencyList getAdjacencyList() {80return adjList;81}82}838485