Class BasicPathBuilder

java.lang.Object
se.swedenconnect.sigval.cert.chain.impl.BasicPathBuilder
All Implemented Interfaces:
PathBuilder

public class BasicPathBuilder extends Object implements PathBuilder
Implementation of a basic path builder used to construct a certificate path from a specified target certificate to a specified set of trust anchors via a finite set of supporting intermediary CA certificates. This implementation uses standard PKIX path validation rules to construct and validate the path.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Constructor Details

    • BasicPathBuilder

      public BasicPathBuilder()
  • Method Details

    • buildPath

      public PKIXCertPathBuilderResult buildPath(X509Certificate targetCertificate, List<X509Certificate> supportingCertificates, CertStore intermediaryStore, List<TrustAnchor> trustAnchors) throws Exception
      Builds the trusted path to a target certificate using the PKIX path building algorithm
      Specified by:
      buildPath in interface PathBuilder
      Parameters:
      targetCertificate - the target certificate the should be validated through this path
      supportingCertificates - supporting certificates provided with the target certificate such as with the validated signature
      intermediaryStore - preconfigured store of intermediary CA certificates
      trustAnchors - certificates that are trusted as trust anchors in the path building process
      Returns:
      CertPathBuilderResult results from path building
      Throws:
      Exception - thrown if certificate path building fails