Class BasicPathBuilder
java.lang.Object
se.swedenconnect.sigval.cert.chain.impl.BasicPathBuilder
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildPath
(X509Certificate targetCertificate, List<X509Certificate> supportingCertificates, CertStore intermediaryStore, List<TrustAnchor> trustAnchors) Builds the trusted path to a target certificate using the PKIX path building algorithm
-
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 interfacePathBuilder
- Parameters:
targetCertificate
- the target certificate the should be validated through this pathsupportingCertificates
- supporting certificates provided with the target certificate such as with the validated signatureintermediaryStore
- preconfigured store of intermediary CA certificatestrustAnchors
- 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
-