public interface KeyProviderInterface
Each category of key information hints (subelements of the XML signature KeyInfo element) can be assigned a corresponding key provider. In the signature creation use case the key provider optionally supplies the XML KeyInfo subelements representing the hints for getting the verification key. In the signature verification use case the key provider supplies the verification key, which will be deduced by analyzing the hints given by the corresponding XML signature KeyInfo subelements.
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Element[] |
getKeyInfoSubelements()
Provides the key information hints (KeyInfo subelements) representing the key information of this key
provider.
|
java.security.Key |
getVerifierKey()
Provides the key to be used for verifying the XML signature.
|
void |
setKeyInfoSubelements(org.w3c.dom.Element[] keyInfoSubElements)
Initializes this key provider with the key information hints (KeyInfo subelements) it has been designed
for.
|
void |
setURIResolverParameters(URIResolverParameters params)
Sets the parameters to be used by the key provider when resolving URIs.
|
java.security.Key getVerifierKey()
throws KeyProviderException
null value must not be returned; to signal that the
verification key cannot be provided, throw an exception.KeyProviderException - if getting the verification key fails for any reason.org.w3c.dom.Element[] getKeyInfoSubelements()
throws KeyProviderException
null; if no subelements should be incorporated into the KeyInfo
element of the XML signature, this method must return an array of length 0.KeyProviderException - if producing the KeyInfo subelements fails for any reason.void setKeyInfoSubelements(org.w3c.dom.Element[] keyInfoSubElements)
throws KeyProviderException
keyInfoSubElement - The key information hints, for which this key provider has been designed for.
The array must contain at least one subelement.KeyProviderException - if initialization with the subelements fails for any reason.void setURIResolverParameters(URIResolverParameters params)
params - The parameters to be set. May be null to indicate a restore of the default
values.