/** * Creates the collection of trust anchors to use during validation. * * @param validationInfo PKIX validation information * * @return trust anchors to use during validation */ protected Set<TrustAnchor> getTrustAnchors(PKIXValidationInformation validationInfo) { Collection<X509Certificate> validationCertificates = validationInfo.getCertificates(); log.trace("Constructing trust anchors for PKIX validation"); Set<TrustAnchor> trustAnchors = new HashSet<TrustAnchor>(); for (X509Certificate cert : validationCertificates) { trustAnchors.add(buildTrustAnchor(cert)); } if (log.isTraceEnabled()) { for (TrustAnchor anchor : trustAnchors) { log.trace("TrustAnchor: {}", anchor.toString()); } } return trustAnchors; }
/** * Get the effective maximum path depth to use when constructing PKIX cert path builder parameters. * * @param validationInfo PKIX validation information * @return the effective max verification depth to use */ protected Integer getEffectiveVerificationDepth(PKIXValidationInformation validationInfo) { Integer effectiveVerifyDepth = validationInfo.getVerificationDepth(); if (effectiveVerifyDepth == null) { effectiveVerifyDepth = options.getDefaultVerificationDepth(); } return effectiveVerifyDepth; }
/** * Get the effective maximum path depth to use when constructing PKIX cert path builder parameters. * * @param validationInfo PKIX validation information * @return the effective max verification depth to use */ protected Integer getEffectiveVerificationDepth(PKIXValidationInformation validationInfo) { Integer effectiveVerifyDepth = validationInfo.getVerificationDepth(); if (effectiveVerifyDepth == null) { effectiveVerifyDepth = options.getDefaultVerificationDepth(); } return effectiveVerifyDepth; }
/** * Creates the collection of trust anchors to use during validation. * * @param validationInfo PKIX validation information * * @return trust anchors to use during validation */ protected Set<TrustAnchor> getTrustAnchors(PKIXValidationInformation validationInfo) { Collection<X509Certificate> validationCertificates = validationInfo.getCertificates(); log.trace("Constructing trust anchors for PKIX validation"); Set<TrustAnchor> trustAnchors = new HashSet<TrustAnchor>(); for (X509Certificate cert : validationCertificates) { trustAnchors.add(buildTrustAnchor(cert)); } if (log.isTraceEnabled()) { for (TrustAnchor anchor : trustAnchors) { log.trace("TrustAnchor: {}", anchor.toString()); } } return trustAnchors; }