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
,JAdESCertificateSource
,XAdESCertificateSource
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:
-
Field Summary
Modifier and TypeFieldDescriptionprotected CandidatesForSigningCertificate
The reference to the object containing all candidates to the signing certificate.Fields inherited from class eu.europa.esig.dss.spi.x509.CommonCertificateSource
certificateMatcher
-
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor initializing object with null signing certificate candidates list -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CandidatesForSigningCertificate
extractCandidatesForSigningCertificate
(CertificateSource signingCertificateSource) Extracts candidates to be a signing certificate from the sourceRetrieves the list of all certificates from the AttrAuthoritiesCertValues (XAdES)Retrieves the list ofCertificateRef
s included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)Retrieves the Set ofCertificateToken
s according to references included in the attribute attribute-certificate-references (CAdES) or the AttributeCertificateRefs/AttributeCertificateRefsV2 (XAdES)getCandidatesForSigningCertificate
(CertificateSource signingCertificateSource) Gets an object containing the signing certificate or information indicating why it is impossible to extract it from the signature.This method returns the certificate source type associated to the implementation class.Retrieves the list of all certificates from CertificateValues (XAdES/CAdES)Retrieves the list ofCertificateRef
s included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)Retrieves the Set ofCertificateToken
s according references to included in the attribute complete-certificate-references (CAdES) or the CompleteCertificateRefs/CompleteCertificateRefsV2 (XAdES)Retrieves the list of all certificates from the DSS dictionary (PAdES)Retrieves the list of all certificates present in the KeyInfo element (XAdES) (can be unsigned)Retrieves the list of all certificates present in a signed element (i.e.Retrieves the list ofCertificateRef
s for the signing certificate (V1/V2)Retrieves the Set ofCertificateToken
s for the signing certificate (V1/V2)Retrieves the list of all certificates from the TimeStampValidationData (XAdES)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, findTokensFromCertRef, getByCertificateDigest, getByPublicKey, getBySignerIdentifier, getBySki, getBySubject, getCertificates, getEntities, getNumberOfCertificates, getNumberOfEntities, isAllSelfSigned, isCertificateSourceEqual, isCertificateSourceEquivalent, isKnown, isTrusted, removeCertificate, reset
-
Field Details
-
candidatesForSigningCertificate
The reference to the object containing all candidates to the signing certificate.
-
-
Constructor Details
-
SignatureCertificateSource
protected SignatureCertificateSource()Default constructor initializing object with null signing certificate candidates list
-
-
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(CertificateSource signingCertificateSource) 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:
signingCertificateSource
-CertificateSource
which allows to resolve the signing certificate from external sources- Returns:
CandidatesForSigningCertificate
-
extractCandidatesForSigningCertificate
protected abstract CandidatesForSigningCertificate extractCandidatesForSigningCertificate(CertificateSource signingCertificateSource) Extracts candidates to be a signing certificate from the source- Parameters:
signingCertificateSource
-CertificateSource
which allows to resolve the signing certificate from external sources (optional)- 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
-