Package eu.europa.esig.dss.spi.x509
Class BaselineBCertificateSelector
java.lang.Object
eu.europa.esig.dss.spi.x509.CertificateReorderer
eu.europa.esig.dss.spi.x509.BaselineBCertificateSelector
This class is used to retrieve the used certificates for a signature from the user parameters.
It avoids duplicate entries, orders certificates from the signing certificate to the Root CA and filters trust
anchors depending on the policy.
-
Constructor Summary
ConstructorsConstructorDescriptionBaselineBCertificateSelector
(CertificateToken signingCertificate, Collection<CertificateToken> certificateChain) Constructor to build a certificate chain forsigningCertificate
-
Method Summary
Modifier and TypeMethodDescriptionReturns a certificate chain for a B-level signature creationsetTrustAnchorBPPolicy
(boolean trustAnchorBPPolicy) Sets whether a trust anchor policy should be used.setTrustedCertificateSource
(CertificateSource trustedCertificateSource) Sets the trusted certificate sourceMethods inherited from class eu.europa.esig.dss.spi.x509.CertificateReorderer
getOrderedCertificateChains, getOrderedCertificates
-
Constructor Details
-
BaselineBCertificateSelector
public BaselineBCertificateSelector(CertificateToken signingCertificate, Collection<CertificateToken> certificateChain) Constructor to build a certificate chain forsigningCertificate
- Parameters:
signingCertificate
-CertificateToken
identifies a signing-certificate to build a certificate chain forcertificateChain
- a collection ofCertificateToken
to build a certificate chain from
-
-
Method Details
-
setTrustedCertificateSource
public BaselineBCertificateSelector setTrustedCertificateSource(CertificateSource trustedCertificateSource) Sets the trusted certificate source- Parameters:
trustedCertificateSource
-CertificateSource
- Returns:
- this
BaselineBCertificateSelector
-
setTrustAnchorBPPolicy
Sets whether a trust anchor policy should be used. When enabled, the trust anchor is not included to the generated certificate chain. Otherwise, the chain is generated up to a trust anchor, including the trust anchor itself. Default : TRUE (trust anchor is not included to the generated certificate chain)- Parameters:
trustAnchorBPPolicy
- whether a trust anchor policy should be used- Returns:
- this
BaselineBCertificateSelector
-
getCertificates
Returns a certificate chain for a B-level signature creation- Returns:
- an ordered list of
CertificateToken
s
-