public class

SignatureSpecificVerificationOptions

extends Object
java.lang.Object
   ↳ xades4j.verification.SignatureSpecificVerificationOptions

Class Overview

Represents verification options that are specific to a signature, i.e., options that are not profile-wide.

It includes base URI, data for anonymous references or resource resolvers

See Also

Summary

Public Constructors
SignatureSpecificVerificationOptions()
Public Methods
SignatureSpecificVerificationOptions setDefaultVerificationDate(Date verificationDate)
Allow to specify a verification date for the signatures that are not covered by timestamps.
SignatureSpecificVerificationOptions useBaseUri(String baseUri)
Sets the base URI to be used when resolving all the relative references.
SignatureSpecificVerificationOptions useDataForAnonymousReference(byte[] data)
Sets the data to be used to resolve and verify a null URI ds:Reference, if present.
SignatureSpecificVerificationOptions useDataForAnonymousReference(InputStream data)
Sets the input stream to be used to resolve and verify a null URI ds:Reference, if present.
SignatureSpecificVerificationOptions useResourceResolver(ResourceResolver resolver)
Registers a ResourceResolver to be used when verifying the signature The resolvers are considered in the same order they are added and have priority over the globally registered resolvers.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SignatureSpecificVerificationOptions ()

Public Methods

public SignatureSpecificVerificationOptions setDefaultVerificationDate (Date verificationDate)

Allow to specify a verification date for the signatures that are not covered by timestamps.

By default signatures not covered by timestamps are verified at the current date ("now").

Parameters
verificationDate the default verification date. If null System.currentTime() will be used
Returns
  • the current instance

public SignatureSpecificVerificationOptions useBaseUri (String baseUri)

Sets the base URI to be used when resolving all the relative references. Fragment references (starting with '#') are not affected.

Parameters
baseUri the references' base uri
Returns
  • the current instance

public SignatureSpecificVerificationOptions useDataForAnonymousReference (byte[] data)

Sets the data to be used to resolve and verify a null URI ds:Reference, if present.

Parameters
data the data
Returns
  • the current instance

public SignatureSpecificVerificationOptions useDataForAnonymousReference (InputStream data)

Sets the input stream to be used to resolve and verify a null URI ds:Reference, if present. The stream is not closed.

Parameters
data the input stream
Returns
  • the current instance

public SignatureSpecificVerificationOptions useResourceResolver (ResourceResolver resolver)

Registers a ResourceResolver to be used when verifying the signature The resolvers are considered in the same order they are added and have priority over the globally registered resolvers.

Parameters
resolver the resolver
Returns
  • the current instance
Throws
NullPointerException if resolver is null