Class KidCertificateSource
java.lang.Object
eu.europa.esig.dss.spi.x509.CommonCertificateSource
eu.europa.esig.dss.jades.validation.KidCertificateSource
- All Implemented Interfaces:
CertificateSource
,Serializable
The certificate source containing a map of certificates by KIDs
- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.x509.CommonCertificateSource
certificateMatcher
-
Constructor Summary
ConstructorDescriptionDefault constructor instantiating object with empty map of 'kid' identifiers and certificate tokens relation -
Method Summary
Modifier and TypeMethodDescriptionaddCertificate
(CertificateToken certificateToAdd) This method adds an external certificate to the source.addCertificate
(String kid, CertificateToken certificate) Adds a certificate for a given 'kid' (JWS/JAdES)Gets aCertificateToken
by the given KIDprotected void
reset()
This method removes all certificates from the sourceMethods inherited from class eu.europa.esig.dss.spi.x509.CommonCertificateSource
doesCertificateReferenceMatch, findTokensFromCertRef, getByCertificateDigest, getByPublicKey, getBySignerIdentifier, getBySki, getBySubject, getCertificates, getCertificateSourceType, getEntities, getNumberOfCertificates, getNumberOfEntities, isAllSelfSigned, isCertificateSourceEqual, isCertificateSourceEquivalent, isKnown, isTrusted, removeCertificate
-
Constructor Details
-
KidCertificateSource
public KidCertificateSource()Default constructor instantiating object with empty map of 'kid' identifiers and certificate tokens relation
-
-
Method Details
-
addCertificate
Description copied from class:CommonCertificateSource
This method adds an external certificate to the source. If the public is already known, the certificate is merged in theCertificateSourceEntity
- Specified by:
addCertificate
in interfaceCertificateSource
- Overrides:
addCertificate
in classCommonCertificateSource
- Parameters:
certificateToAdd
- the certificate to be added- Returns:
- the corresponding certificate token
-
addCertificate
Adds a certificate for a given 'kid' (JWS/JAdES)- Parameters:
kid
- the used kid in the JWS/JAdEScertificate
- the related certificate token- Returns:
- the certificate
-
getCertificateByKid
Gets aCertificateToken
by the given KID- Parameters:
kid
-String
to get a certificate token with- Returns:
CertificateToken
-
reset
protected void reset()Description copied from class:CommonCertificateSource
This method removes all certificates from the source- Overrides:
reset
in classCommonCertificateSource
-