1 7 8 package java.security.cert; 9 10 import java.security.PublicKey ; 11 12 42 public class PKIXCertPathBuilderResult extends PKIXCertPathValidatorResult 43 implements CertPathBuilderResult { 44 45 private CertPath certPath; 46 47 61 public PKIXCertPathBuilderResult(CertPath certPath, 62 TrustAnchor trustAnchor, PolicyNode policyTree, 63 PublicKey subjectPublicKey) 64 { 65 super(trustAnchor, policyTree, subjectPublicKey); 66 if (certPath == null) 67 throw new NullPointerException ("certPath must be non-null"); 68 this.certPath = certPath; 69 } 70 71 81 public CertPath getCertPath() { 82 return certPath; 83 } 84 85 92 public String toString() { 93 StringBuffer sb = new StringBuffer (); 94 sb.append("PKIXCertPathBuilderResult: [\n"); 95 sb.append(" Certification Path: " + certPath + "\n"); 96 sb.append(" Trust Anchor: " + getTrustAnchor().toString() + "\n"); 97 sb.append(" Policy Tree: " + String.valueOf(getPolicyTree()) + "\n"); 98 sb.append(" Subject Public Key: " + getPublicKey() + "\n"); 99 sb.append("]"); 100 return sb.toString(); 101 } 102 } 103 | Popular Tags |