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 CommonCertificateSource
certificateMatcher -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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 aCertificateTokenby the given KIDprotected voidreset()This method removes all certificates from the sourceMethods inherited from class CommonCertificateSource
doesCertificateReferenceMatch, findTokensFromCertRef, getByCertificateDigest, getByEntityKey, getByPublicKey, getBySignerIdentifier, getBySki, getBySubject, getCertificates, getCertificateSourceType, getEntities, getNumberOfCertificates, getNumberOfEntities, isAllSelfSigned, isCertificateSourceEqual, isCertificateSourceEquivalent, isKnown, isTrusted, isTrustedAtTime, 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:CommonCertificateSourceThis method adds an external certificate to the source. If the public is already known, the certificate is merged in theCertificateSourceEntity- Specified by:
addCertificatein interfaceCertificateSource- Overrides:
addCertificatein 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 aCertificateTokenby the given KID- Parameters:
kid-Stringto get a certificate token with- Returns:
CertificateToken
-
reset
protected void reset()Description copied from class:CommonCertificateSourceThis method removes all certificates from the source- Overrides:
resetin classCommonCertificateSource
-