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 CandidatesForSigningCertificatecandidatesForSigningCertificateThe 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 CandidatesForSigningCertificateextractCandidatesForSigningCertificate(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 ofCertificateRefs included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)Set<CertificateToken>getAttributeCertificates()Retrieves the Set ofCertificateTokens according to references included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)CandidatesForSigningCertificategetCandidatesForSigningCertificate(CertificateToken providedSigningCertificateToken)Gets an object containing the signing certificate or information indicating why it is impossible to extract it from the signature.CertificateSourceTypegetCertificateSourceType()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 ofCertificateRefs included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)Set<CertificateToken>getCompleteCertificates()Retrieves the Set 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)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 ofCertificateRefs for the signing certificate (V1/V2)Set<CertificateToken>getSigningCertificates()Retrieves the Set ofCertificateTokens 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, getReferencesForCertificateTokenMethods 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 ofCertificateRefs for the signing certificate (V1/V2)- Returns:
- the list of references to the signing certificate
-
getCompleteCertificateRefs
Retrieves the list ofCertificateRefs included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)- Returns:
- the list of certificate references
-
getAttributeCertificateRefs
Retrieves the list ofCertificateRefs included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)- Returns:
- the list of certificate references
-
getSigningCertificates
Retrieves the Set ofCertificateTokens for the signing certificate (V1/V2)- Returns:
- Set of
CertificateTokens
-
getCompleteCertificates
Retrieves the Set ofCertificateTokens according references to included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)- Returns:
- Set of
CertificateTokens
-
getAttributeCertificates
Retrieves the Set ofCertificateTokens according to references included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)- Returns:
- Set of
CertificateTokens
-
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-CertificateTokenprovided 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-CertificateTokenprovided by a user (if defined)- Returns:
CandidatesForSigningCertificate
-
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
-