Package eu.europa.esig.dss.validation
Class SignatureCertificateSource
- java.lang.Object
-
- eu.europa.esig.dss.spi.x509.CommonCertificateSource
-
- eu.europa.esig.dss.validation.SignatureCertificateSource
-
- All Implemented Interfaces:
CertificateSource,Serializable
- Direct Known Subclasses:
CMSCertificateSource,XAdESCertificateSource
public abstract class SignatureCertificateSource extends CommonCertificateSource
The advanced signature contains a list of certificate that was needed to validate the signature. This class is a basic skeleton that is able to retrieve the needed certificate from a list. The child need to retrieve the list of wrapped certificates.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSignatureCertificateSource(CertificatePool certPool)The default constructor with mandatory certificates pool.
-
Method Summary
Modifier and Type Method Description List<CertificateToken>findTokensFromRefs(List<CertificateRef> certificateRefs)Returns list ofCertificateTokens for the providedCertificateRefsList<CertificateRef>getAllCertificateRefs()abstract List<CertificateToken>getAttrAuthoritiesCertValues()Retrieves the list of all certificates from the AttrAuthoritiesCertValues (XAdES)abstract List<CertificateRef>getAttributeCertificateRefs()Retrieves the list ofCertificateRefs included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)List<CertificateToken>getAttributeCertificates()Retrieves the list ofCertificateTokens according to references included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)CertificateRefgetCertificateRefByDigest(Digest digest)Returns a containedCertificateRefwith the givendigestCertificateSourceTypegetCertificateSourceType()This method returns the certificate source type associated to the implementation class.abstract List<CertificateToken>getCertificateValues()Retrieves the list of all certificates from CertificateValues (XAdES/CAdES)abstract List<CertificateRef>getCompleteCertificateRefs()Retrieves the list ofCertificateRefs included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)List<CertificateToken>getCompleteCertificates()Retrieves the list ofCertificateTokens according references to included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)List<CertificateToken>getDSSDictionaryCertValues()Retrieves the list of all certificates from the DSS dictionary (PAdES)protected IssuerSerialInfogetIssuerInfo(org.bouncycastle.asn1.x509.IssuerSerial issuerAndSerial)abstract List<CertificateToken>getKeyInfoCertificates()Retrieves the list of all certificates present in the KeyInfosList<CertificateRef>getOrphanCertificateRefs()Returns a list of orphan certificate refsList<CertificateRef>getReferencesForCertificateToken(CertificateToken certificateToken)Returns list ofCertificateRefs found for the givencertificateTokenList<CertificateToken>getSigningCertificates()Retrieves the list ofCertificateTokens for the signing certificate (V1/V2)abstract List<CertificateRef>getSigningCertificateValues()Retrieves the list ofCertificateRefs for the signing certificate (V1/V2)abstract List<CertificateToken>getTimeStampValidationDataCertValues()Retrieves the list of all certificates from the TimeStampValidationData (XAdES)List<CertificateToken>getVRIDictionaryCertValues()Retrieves the list of all certificates from the VRI dictionary (PAdES)-
Methods inherited from class eu.europa.esig.dss.spi.x509.CommonCertificateSource
addCertificate, getCertificatePool, getCertificates, getCertificateTokenByDigest, getNumberOfCertificates, isTrusted, removeCertificate
-
-
-
-
Constructor Detail
-
SignatureCertificateSource
protected SignatureCertificateSource(CertificatePool certPool)
The default constructor with mandatory certificates pool.- Parameters:
certPool- the certificate pool
-
-
Method Detail
-
getKeyInfoCertificates
public abstract List<CertificateToken> getKeyInfoCertificates()
Retrieves the list of all certificates present in the KeyInfos- Returns:
- list of all certificates present in B level
-
getCertificateValues
public abstract List<CertificateToken> getCertificateValues()
Retrieves the list of all certificates from CertificateValues (XAdES/CAdES)- Returns:
- the list of all certificates present in the CertificateValues
-
getAttrAuthoritiesCertValues
public abstract List<CertificateToken> getAttrAuthoritiesCertValues()
Retrieves the list of all certificates from the AttrAuthoritiesCertValues (XAdES)- Returns:
- the list of all certificates present in the AttrAuthoritiesCertValues
-
getTimeStampValidationDataCertValues
public abstract List<CertificateToken> getTimeStampValidationDataCertValues()
Retrieves the list of all certificates from the TimeStampValidationData (XAdES)- Returns:
- the list of all certificates present in the TimeStampValidationData
-
getDSSDictionaryCertValues
public List<CertificateToken> getDSSDictionaryCertValues()
Retrieves the list of all certificates from the DSS dictionary (PAdES)- Returns:
- the list of all certificates present in the DSS dictionary
-
getVRIDictionaryCertValues
public List<CertificateToken> getVRIDictionaryCertValues()
Retrieves the list of all certificates from the VRI dictionary (PAdES)- Returns:
- the list of all certificates present in the VRI dictionary
-
getSigningCertificateValues
public abstract List<CertificateRef> getSigningCertificateValues()
Retrieves the list ofCertificateRefs for the signing certificate (V1/V2)- Returns:
- the list of references to the signing certificate
-
getSigningCertificates
public List<CertificateToken> getSigningCertificates()
Retrieves the list ofCertificateTokens for the signing certificate (V1/V2)- Returns:
- list of
CertificateTokens
-
getCompleteCertificateRefs
public abstract List<CertificateRef> getCompleteCertificateRefs()
Retrieves the list ofCertificateRefs included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)- Returns:
- the list of certificate references
-
getCompleteCertificates
public List<CertificateToken> getCompleteCertificates()
Retrieves the list ofCertificateTokens according references to included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)- Returns:
- list of
CertificateTokens
-
getAttributeCertificateRefs
public abstract List<CertificateRef> getAttributeCertificateRefs()
Retrieves the list ofCertificateRefs included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)- Returns:
- the list of certificate references
-
getAttributeCertificates
public List<CertificateToken> getAttributeCertificates()
Retrieves the list ofCertificateTokens according to references included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)- Returns:
- list of
CertificateTokens
-
getCertificateSourceType
public CertificateSourceType getCertificateSourceType()
Description copied from interface:CertificateSourceThis method returns the certificate source type associated to the implementation class.- Specified by:
getCertificateSourceTypein interfaceCertificateSource- Overrides:
getCertificateSourceTypein classCommonCertificateSource- Returns:
- the certificate origin
-
getReferencesForCertificateToken
public List<CertificateRef> getReferencesForCertificateToken(CertificateToken certificateToken)
Returns list ofCertificateRefs found for the givencertificateToken- Parameters:
certificateToken-CertificateTokento find references for- Returns:
- list of
CertificateRefs
-
findTokensFromRefs
public List<CertificateToken> findTokensFromRefs(List<CertificateRef> certificateRefs)
Returns list ofCertificateTokens for the providedCertificateRefs- Parameters:
certificateRefs- list ofCertificateRefs- Returns:
- list of
CertificateTokens
-
getAllCertificateRefs
public List<CertificateRef> getAllCertificateRefs()
-
getCertificateRefByDigest
public CertificateRef getCertificateRefByDigest(Digest digest)
Returns a containedCertificateRefwith the givendigest- Parameters:
digest-Digestto find aCertificateRefwith- Returns:
CertificateRef
-
getOrphanCertificateRefs
public List<CertificateRef> getOrphanCertificateRefs()
Returns a list of orphan certificate refs- Returns:
- list of
CertificateRefs
-
getIssuerInfo
protected IssuerSerialInfo getIssuerInfo(org.bouncycastle.asn1.x509.IssuerSerial issuerAndSerial)
-
-