Class CommonX509URLCertificateSource
java.lang.Object
eu.europa.esig.dss.spi.x509.CommonCertificateSource
eu.europa.esig.dss.jades.validation.CommonX509URLCertificateSource
- All Implemented Interfaces:
X509URLCertificateSource
,CertificateSource
,Serializable
public class CommonX509URLCertificateSource
extends CommonCertificateSource
implements X509URLCertificateSource
The common implementation of
X509URLCertificateSource
retrieving X.509 certificates by the given URI- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.x509.CommonCertificateSource
certificateMatcher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCertificate
(CertificateToken certificateToAdd) This method adds an external certificate to the source.addCertificate
(String uri, CertificateToken certificate) Adds a certificate for a given 'x5u' URL (JWS/JAdES)addCertificates
(String uri, Collection<CertificateToken> certificates) Adds a collection of certificates for a given 'x5u' URL (JWS/JAdES)Gets a collection ofCertificateToken
s retrieved from the given URIprotected 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.europa.esig.dss.spi.x509.CertificateSource
findTokensFromCertRef, getByCertificateDigest, getByPublicKey, getBySignerIdentifier, getBySki, getBySubject, getCertificates, getCertificateSourceType, getEntities, isAllSelfSigned, isCertificateSourceEqual, isCertificateSourceEquivalent, isKnown, isTrusted
-
Constructor Details
-
CommonX509URLCertificateSource
public CommonX509URLCertificateSource()Default constructor
-
-
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 'x5u' URL (JWS/JAdES)- Parameters:
uri
- the used URI in the JWS/JAdEScertificate
- the related certificate token- Returns:
- the certificate
-
addCertificates
public Collection<CertificateToken> addCertificates(String uri, Collection<CertificateToken> certificates) Adds a collection of certificates for a given 'x5u' URL (JWS/JAdES)- Parameters:
uri
- the used URI in the JWS/JAdEScertificates
- a collection ofCertificateToken
s- Returns:
- the certificate
-
getCertificatesByUrl
Description copied from interface:X509URLCertificateSource
Gets a collection ofCertificateToken
s retrieved from the given URI- Specified by:
getCertificatesByUrl
in interfaceX509URLCertificateSource
- Parameters:
uri
-String
to get a certificate tokens from- Returns:
- a collection of
CertificateToken
s
-
reset
protected void reset()Description copied from class:CommonCertificateSource
This method removes all certificates from the source- Overrides:
reset
in classCommonCertificateSource
-