Class XadesVerificationProfile

java.lang.Object
xades4j.verification.XadesVerificationProfile

public final class XadesVerificationProfile extends Object
A profile for signature verification. This class is the entry point for verifying a signature. A profile is a configuration for the signature verification process.

The purpose of this class is to create a XadesVerifier that will actually verify signatures using the configured components.

The minimum configuration is a CertificateValidationProvider because the validation data (trust-anchors, CRLs, etc) has to be properly selected. All the other components have default implementations that are used if no other actions are taken. However, all of them can be replaced through the corresponding methods, either by an instance or a class. When a class is used it may have dependencies on other components, which will be handled in order to create the XadesVerifier. The types may also depend on external components, as long as that dependency is registered with on of the addBinding methods. To that end, the constructors and/or setters should use the Inject annotation from Guice.

Custom QualifyingPropertyVerifiers can also be configured. The principles on their dependencies are the same. In addition, custom verifiers that apply over the whole on different stages of validation can be configured. Finally, verifiers for specific XML elements may be added. This can be useful if one wants to handle an unsigned property that is not known by the library, as the default unmarshaller will create GenericDOMData instances for those properties if acceptUnknownProperties is set.

Repeated dependency bindings will not cause an immediate error. An exception will be thrown when an instance of XadesVerifier is requested.

Author:
Luís