Class OfflineRevocationSource<R extends Revocation>
java.lang.Object
eu.europa.esig.dss.spi.x509.revocation.OfflineRevocationSource<R>
- Type Parameters:
R- the revocation class type (CRL/OCSP)
- All Implemented Interfaces:
MultipleRevocationSource<R>,RevocationSource<R>,Serializable
- Direct Known Subclasses:
OfflineCRLSource,OfflineOCSPSource
public abstract class OfflineRevocationSource<R extends Revocation>
extends Object
implements RevocationSource<R>, MultipleRevocationSource<R>
Represents a revocation sources for a data obtained from an offline source (e.g. signature)
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOfflineRevocationSource(RevocationTokenRefMatcher<R> tokenRefMatcher) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBinary(EncapsulatedRevocationTokenIdentifier<R> binary, RevocationOrigin origin) This method adds a token binary with its originvoidaddRevocation(RevocationToken<R> token, RevocationOrigin origin) This method adds a revocation token with its originvoidaddRevocation(RevocationToken<R> token, EncapsulatedRevocationTokenIdentifier<R> binary) This method adds aRevocationTokenfrom the binaryvoidaddRevocationReference(RevocationRef<R> reference, RevocationRefOrigin origin) This method adds a revocation reference with its originReturns the linkedEncapsulatedRevocationTokenIdentifierfor a givenRevocationRefRetrieves a Map of orphanRevocationRefwith theirRevocationRefOrigins for a givenEncapsulatedRevocationTokenIdentifierfindRefsAndOriginsForRevocationToken(RevocationToken<R> revocationToken) Retrieves a Map of foundRevocationRefwith their origins for the givenRevocationTokenRetrieves the list of allEncapsulatedRevocationTokenIdentifiers present in the ADBE signed attributeRetrieves the list of allRevocationTokens present in the ADBE signed attribute NOTE: Applicable only for PAdES revocation sourceRetrieves the Set of tokens which have a referenceRetrieves all found revocation binariesRetrieves all found revocation binaries with their originsRetrieves a Set of all foundRevocationRefRetrieves a Set of all foundRevocationTokenReturns all tokens with their originsRetrieves the list of allRevocationRefs present in the signature 'attribute-revocation-references' attribute (used in CAdES and XAdES)Retrieves the list of allEncapsulatedRevocationTokenIdentifiers present in 'AttributeRevocationValues' elementRetrieves the list of allRevocationTokens present in 'AttributeRevocationValues' elementRetrieves the list of allEncapsulatedRevocationTokenIdentifiers present in the CMS SignedData NOTE: Applicable only for CAdES revocation sourcesRetrieves the list of allRevocationTokens present in the CMS SignedData NOTE: Applicable only for CAdES revocation sourcesRetrieves the list of allRevocationRefs present in the signature 'complete-revocation-references' attribute (used in CAdES and XAdES)Retrieves the list of allEncapsulatedRevocationTokenIdentifiers present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation sourceRetrieves the list of allRevocationTokens present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation sourceRetrieves a Map of orphanRevocationRefwith theirRevocationRefOriginsprotected Map<RevocationRef<R>,Set<RevocationRefOrigin>> Returns a map of revocation references with the corresponding originsgetRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken) This method returns the latest issued revocation token from a set of all revocation data found for the givencertificateToken.Retrieves the list of allEncapsulatedRevocationTokenIdentifiers present in 'RevocationValues' elementRetrieves the list of allRevocationTokens present in 'RevocationValues' elementRetrieves the list of allEncapsulatedRevocationTokenIdentifiers present in 'TimestampValidationData' elementRetrieves the list of allRevocationTokens present in 'TimestampValidationData' elementReturns a Map of uniqueRevocationTokenbased on binary (a same binary can cover several certificates) with their originsRetrieves the list of allEncapsulatedRevocationTokenIdentifiers present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation sourceRetrieves the list of allRevocationTokens present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation sourcebooleanisEmpty()This method checks if the revocation source is emptybooleanisOrphan(RevocationRef<R> reference) This method verifies if a givenRevocationRefis an orphan (not linked to a completeRevocationTokenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.europa.esig.dss.spi.x509.revocation.MultipleRevocationSource
getRevocationTokens
-
Constructor Details
-
OfflineRevocationSource
The default constructor- Parameters:
tokenRefMatcher-RevocationTokenRefMatcherused to match tokens and their corresponding references
-
-
Method Details
-
addBinary
This method adds a token binary with its origin- Parameters:
binary- the binary token to be addedorigin- the origin where the token has been found
-
addRevocation
This method adds a revocation token with its origin- Parameters:
token- the revocation token to be addedorigin- the origin where the token has been found
-
addRevocation
public void addRevocation(RevocationToken<R> token, EncapsulatedRevocationTokenIdentifier<R> binary) This method adds aRevocationTokenfrom the binary- Parameters:
token- the token to be addedbinary- the binary where the token has been extracted
-
addRevocationReference
This method adds a revocation reference with its origin- Parameters:
reference- the revocation reference to be addedorigin- the origin where the reference has been found
-
getAllRevocationBinaries
Retrieves all found revocation binaries- Returns:
- a Set of
EncapsulatedRevocationTokenIdentifier
-
getAllRevocationBinariesWithOrigins
public Map<EncapsulatedRevocationTokenIdentifier<R>,Set<RevocationOrigin>> getAllRevocationBinariesWithOrigins()Retrieves all found revocation binaries with their origins- Returns:
- a Map of
EncapsulatedRevocationTokenIdentifierwith their origins
-
getAllRevocationTokens
Retrieves a Set of all foundRevocationToken- Returns:
- all
RevocationToken
-
getAllRevocationTokensWithOrigins
Returns all tokens with their origins- Returns:
- a map of tokens with the different origins
-
getUniqueRevocationTokensWithOrigins
Returns a Map of uniqueRevocationTokenbased on binary (a same binary can cover several certificates) with their origins- Returns:
- a map of tokens with the different origins
-
getAllRevocationReferences
Retrieves a Set of all foundRevocationRef- Returns:
- all
RevocationRef
-
getRevocationReferencesWithOrigins
Returns a map of revocation references with the corresponding origins- Returns:
- a map between
RevocationRefs and a set ofRevocationRefOrigins
-
getRevocationToken
public RevocationToken<R> getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken) This method returns the latest issued revocation token from a set of all revocation data found for the givencertificateToken. Returns NULL, if no corresponding revocation data found for the certificate.- Specified by:
getRevocationTokenin interfaceRevocationSource<R extends Revocation>- Parameters:
certificateToken- TheCertificateTokenfor which the request is madeissuerCertificateToken- TheCertificateTokenwhich is the issuer of the certificateToken- Returns:
RevocationToken
-
getCMSSignedDataRevocationBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifiers present in the CMS SignedData NOTE: Applicable only for CAdES revocation sources- Returns:
- list of
EncapsulatedRevocationTokenIdentifiers
-
getCMSSignedDataRevocationTokens
Retrieves the list of allRevocationTokens present in the CMS SignedData NOTE: Applicable only for CAdES revocation sources- Returns:
- list of
RevocationTokens
-
getRevocationValuesBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifiers present in 'RevocationValues' element- Returns:
- list of
EncapsulatedRevocationTokenIdentifiers
-
getRevocationValuesTokens
Retrieves the list of allRevocationTokens present in 'RevocationValues' element- Returns:
- list of
RevocationTokens
-
getAttributeRevocationValuesBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifiers present in 'AttributeRevocationValues' element- Returns:
- list of
EncapsulatedRevocationTokenIdentifiers
-
getAttributeRevocationValuesTokens
Retrieves the list of allRevocationTokens present in 'AttributeRevocationValues' element- Returns:
- list of
RevocationTokens
-
getTimestampValidationDataBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifiers present in 'TimestampValidationData' element- Returns:
- list of
EncapsulatedRevocationTokenIdentifiers
-
getTimestampValidationDataTokens
Retrieves the list of allRevocationTokens present in 'TimestampValidationData' element- Returns:
- list of
RevocationTokens
-
getDSSDictionaryBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifiers present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation source- Returns:
- list of
RevocationTokens
-
getDSSDictionaryTokens
Retrieves the list of allRevocationTokens present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation source- Returns:
- list of
RevocationTokens
-
getVRIDictionaryBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifiers present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation source- Returns:
- list of
RevocationTokens
-
getVRIDictionaryTokens
Retrieves the list of allRevocationTokens present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation source- Returns:
- list of
RevocationTokens
-
getADBERevocationValuesBinaries
Retrieves the list of allEncapsulatedRevocationTokenIdentifiers present in the ADBE signed attribute- Returns:
- list of
EncapsulatedRevocationTokenIdentifiers
-
getADBERevocationValuesTokens
Retrieves the list of allRevocationTokens present in the ADBE signed attribute NOTE: Applicable only for PAdES revocation source- Returns:
- list of
RevocationTokens
-
getCompleteRevocationRefs
Retrieves the list of allRevocationRefs present in the signature 'complete-revocation-references' attribute (used in CAdES and XAdES)- Returns:
- list of
RevocationRefs
-
getAttributeRevocationRefs
Retrieves the list of allRevocationRefs present in the signature 'attribute-revocation-references' attribute (used in CAdES and XAdES)- Returns:
- list of
RevocationRefs
-
findRefsAndOriginsForRevocationToken
public Map<RevocationRef<R>,Set<RevocationRefOrigin>> findRefsAndOriginsForRevocationToken(RevocationToken<R> revocationToken) Retrieves a Map of foundRevocationRefwith their origins for the givenRevocationToken- Parameters:
revocationToken-RevocationTokento get references for- Returns:
- Map of
RevocationRefs with their origins
-
findRefsAndOriginsForBinary
public Map<RevocationRef<R>,Set<RevocationRefOrigin>> findRefsAndOriginsForBinary(EncapsulatedRevocationTokenIdentifier<R> identifier) Retrieves a Map of orphanRevocationRefwith theirRevocationRefOrigins for a givenEncapsulatedRevocationTokenIdentifier- Parameters:
identifier-EncapsulatedRevocationTokenIdentifier- Returns:
- a Map of orphan references with their origins
-
findBinaryForReference
Returns the linkedEncapsulatedRevocationTokenIdentifierfor a givenRevocationRef- Parameters:
ref- theRevocationRefto find- Returns:
- the related
EncapsulatedRevocationTokenIdentifier
-
getOrphanRevocationReferencesWithOrigins
Retrieves a Map of orphanRevocationRefwith theirRevocationRefOrigins- Returns:
- a Map of orphan references with their origins
-
isOrphan
This method verifies if a givenRevocationRefis an orphan (not linked to a completeRevocationToken- Parameters:
reference- the reference to be tested- Returns:
- true if the given reference is an orphan
-
getAllReferencedRevocationBinaries
Retrieves the Set of tokens which have a reference- Returns:
- a Set of Token Identifiers which are referenced
-
isEmpty
public boolean isEmpty()This method checks if the revocation source is empty- Returns:
- true if the source is empty
-