Package eu.europa.esig.dss.validation
Class SignatureCertificateSource
java.lang.Object
eu.europa.esig.dss.spi.x509.CommonCertificateSource
eu.europa.esig.dss.spi.x509.TokenCertificateSource
eu.europa.esig.dss.validation.SignatureCertificateSource
- All Implemented Interfaces:
CertificateSource
,Serializable
- Direct Known Subclasses:
CMSCertificateSource
,XAdESCertificateSource
public abstract class SignatureCertificateSource extends TokenCertificateSource
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
-
Field Summary
Fields Modifier and Type Field Description protected CandidatesForSigningCertificate
candidatesForSigningCertificate
The reference to the object containing all candidates to the signing certificate. -
Constructor Summary
Constructors Constructor Description SignatureCertificateSource()
-
Method Summary
Modifier and Type Method Description protected abstract CandidatesForSigningCertificate
extractCandidatesForSigningCertificate(CertificateToken providedSigningCertificateToken)
Extracts candidates to be a signing certificate from the sourceList<CertificateToken>
getAttrAuthoritiesCertValues()
Retrieves the list of all certificates from the AttrAuthoritiesCertValues (XAdES)List<CertificateRef>
getAttributeCertificateRefs()
Retrieves the list ofCertificateRef
s included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)Set<CertificateToken>
getAttributeCertificates()
Retrieves the Set ofCertificateToken
s according to references included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)CandidatesForSigningCertificate
getCandidatesForSigningCertificate(CertificateToken providedSigningCertificateToken)
Gets an object containing the signing certificate or information indicating why it is impossible to extract it from the signature.CertificateSourceType
getCertificateSourceType()
This method returns the certificate source type associated to the implementation class.List<CertificateToken>
getCertificateValues()
Retrieves the list of all certificates from CertificateValues (XAdES/CAdES)List<CertificateRef>
getCompleteCertificateRefs()
Retrieves the list ofCertificateRef
s included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)Set<CertificateToken>
getCompleteCertificates()
Retrieves the Set ofCertificateToken
s 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)List<CertificateToken>
getKeyInfoCertificates()
Retrieves the list of all certificates present in the KeyInfo element (XAdES) (can be unsigned)List<CertificateToken>
getSignedDataCertificates()
Retrieves the list of all certificates present in a signed element (i.e. the CMS Signed data (CAdES))List<CertificateRef>
getSigningCertificateRefs()
Retrieves the list ofCertificateRef
s for the signing certificate (V1/V2)Set<CertificateToken>
getSigningCertificates()
Retrieves the Set ofCertificateToken
s for the signing certificate (V1/V2)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.TokenCertificateSource
addCertificate, addCertificateIdentifier, addCertificateRef, findTokensFromRefs, getAllCertificateIdentifiers, getAllCertificateRefs, getCertificateRefOrigins, getCertificateRefsByOrigin, getCertificateToken, getCertificateTokensByOrigin, getCurrentCertificateIdentifier, getOrphanCertificateRefs, getReferencesForCertificateToken
Methods inherited from class eu.europa.esig.dss.spi.x509.CommonCertificateSource
addCertificate, getByCertificateIdentifier, getByPublicKey, getBySki, getBySubject, getCertificates, getEntities, getNumberOfCertificates, getNumberOfEntities, isAllSelfSigned, isKnown, isTrusted, reset
-
Field Details
-
candidatesForSigningCertificate
The reference to the object containing all candidates to the signing certificate.
-
-
Constructor Details
-
SignatureCertificateSource
public SignatureCertificateSource()
-
-
Method Details
-
getSignedDataCertificates
Retrieves the list of all certificates present in a signed element (i.e. the CMS Signed data (CAdES))- Returns:
- list of all certificates present in a signed element
-
getKeyInfoCertificates
Retrieves the list of all certificates present in the KeyInfo element (XAdES) (can be unsigned)- Returns:
- list of all certificates present in KeyInfo
-
getCertificateValues
Retrieves the list of all certificates from CertificateValues (XAdES/CAdES)- Returns:
- the list of all certificates present in the CertificateValues
-
getAttrAuthoritiesCertValues
Retrieves the list of all certificates from the AttrAuthoritiesCertValues (XAdES)- Returns:
- the list of all certificates present in the AttrAuthoritiesCertValues
-
getTimeStampValidationDataCertValues
Retrieves the list of all certificates from the TimeStampValidationData (XAdES)- Returns:
- the list of all certificates present in the TimeStampValidationData
-
getDSSDictionaryCertValues
Retrieves the list of all certificates from the DSS dictionary (PAdES)- Returns:
- the list of all certificates present in the DSS dictionary
-
getVRIDictionaryCertValues
Retrieves the list of all certificates from the VRI dictionary (PAdES)- Returns:
- the list of all certificates present in the VRI dictionary
-
getSigningCertificateRefs
Retrieves the list ofCertificateRef
s for the signing certificate (V1/V2)- Returns:
- the list of references to the signing certificate
-
getCompleteCertificateRefs
Retrieves the list ofCertificateRef
s included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)- Returns:
- the list of certificate references
-
getAttributeCertificateRefs
Retrieves the list ofCertificateRef
s included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)- Returns:
- the list of certificate references
-
getSigningCertificates
Retrieves the Set ofCertificateToken
s for the signing certificate (V1/V2)- Returns:
- Set of
CertificateToken
s
-
getCompleteCertificates
Retrieves the Set ofCertificateToken
s according references to included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)- Returns:
- Set of
CertificateToken
s
-
getAttributeCertificates
Retrieves the Set ofCertificateToken
s according to references included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)- Returns:
- Set of
CertificateToken
s
-
getCandidatesForSigningCertificate
public CandidatesForSigningCertificate getCandidatesForSigningCertificate(CertificateToken providedSigningCertificateToken)Gets an object containing the signing certificate or information indicating why it is impossible to extract it from the signature. If the signing certificate is identified then it is cached and the subsequent calls to this method will return this cached value. This method never returns null.- Parameters:
providedSigningCertificateToken
-CertificateToken
provided by a user (if defined)- Returns:
CandidatesForSigningCertificate
-
extractCandidatesForSigningCertificate
protected abstract CandidatesForSigningCertificate extractCandidatesForSigningCertificate(CertificateToken providedSigningCertificateToken)Extracts candidates to be a signing certificate from the source- Parameters:
providedSigningCertificateToken
-CertificateToken
provided by a user (if defined)- Returns:
CandidatesForSigningCertificate
-
getCertificateSourceType
Description copied from interface:CertificateSource
This method returns the certificate source type associated to the implementation class.- Specified by:
getCertificateSourceType
in interfaceCertificateSource
- Overrides:
getCertificateSourceType
in classCommonCertificateSource
- Returns:
- the certificate origin
-