/** * * @return the PublicKey if the last certificate in the CertPath * @throws IllegalStateException if the {@link PKIXCertPathReviewer} was not initialized */ public PublicKey getSubjectPublicKey() { doChecks(); return subjectPublicKey; }
/** * Returns an List of notification messages for the certificate at the given index in the CertPath. * If index == -1 then the list of global notifications is returned with notifications not specific to a certificate. * @param index the index of the certificate in the CertPath * @return List of notification messages for the certificate * @throws IllegalStateException if the {@link PKIXCertPathReviewer} was not initialized */ public List getNotifications(int index) { doChecks(); return notifications[index + 1]; }
/** * * @return the TrustAnchor for the CertPath, <b>null</b> if no valid TrustAnchor was found. * @throws IllegalStateException if the {@link PKIXCertPathReviewer} was not initialized */ public TrustAnchor getTrustAnchor() { doChecks(); return trustAnchor; }
/** * Returns an Array of Lists which contains a List of global error messages * and a List of error messages for each certificate in the path. * The global error List is at index 0. The error lists for each certificate at index 1 to n. * The error messages are of type. * @return the Array of Lists which contain the error messages * @throws IllegalStateException if the {@link PKIXCertPathReviewer} was not initialized */ public List[] getErrors() { doChecks(); return errors; }
/** * Returns an Array of Lists which contains a List of global notification messages * and a List of botification messages for each certificate in the path. * The global notificatio List is at index 0. The notification lists for each certificate at index 1 to n. * The error messages are of type. * @return the Array of Lists which contain the notification messages * @throws IllegalStateException if the {@link PKIXCertPathReviewer} was not initialized */ public List[] getNotifications() { doChecks(); return notifications; }
/** * Returns an List of error messages for the certificate at the given index in the CertPath. * If index == -1 then the list of global errors is returned with errors not specific to a certificate. * @param index the index of the certificate in the CertPath * @return List of error messages for the certificate * @throws IllegalStateException if the {@link PKIXCertPathReviewer} was not initialized */ public List getErrors(int index) { doChecks(); return errors[index + 1]; }
/** * * @return the valid policy tree, <b>null</b> if no valid policy exists. * @throws IllegalStateException if the {@link PKIXCertPathReviewer} was not initialized */ public PolicyNode getPolicyTree() { doChecks(); return policyTree; }
/** * * @return if the CertPath is valid * @throws IllegalStateException if the {@link PKIXCertPathReviewer} was not initialized */ public boolean isValidCertPath() { doChecks(); boolean valid = true; for (int i = 0; i < errors.length; i++) { if (!errors[i].isEmpty()) { valid = false; break; } } return valid; }