Top Description Constructors Methods
com.sun.org.apache.xml.internal.security.keys.keyresolver

public abstract Class KeyResolverSpi

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DEREncodedKeyValueResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DSAKeyValueResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.ECKeyValueResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.KeyInfoReferenceResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.PrivateKeyResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RetrievalMethodResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RSAKeyValueResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.SecretKeyResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.SingleKeyResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509CertificateResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509DigestResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509IssuerSerialResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SKIResolver, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SubjectNameResolver
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, java.security.PrivateKey, .PublicKey, java.security.cert.X509Certificate, javax.crypto.SecretKey, com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver, com.sun.org.apache.xml.internal.security.parser.XMLParserException, com.sun.org.apache.xml.internal.security.utils.XMLUtils, org.w3c.dom.Document, .Element

This class is an abstract class to resolve a Key of some kind given a KeyInfo element. If you want the your KeyResolver, at firstly you must extend this class, and register as following in config.xml
 <KeyResolver URI="http://www.w3.org/2000/09/xmldsig#KeyValue"
  JAVACLASS="MyPackage.MyKeyValueImpl"//gt;
Extensions of this class must be thread-safe.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected abstract boolean

Returns:

whether the KeyResolverSpi is able to perform the requested action.
engineCanResolve
(Element element, String baseURI, StorageResolver storage)

This method returns whether the KeyResolverSpi is able to perform the requested action.

public PrivateKey

Returns:

resolved PrivateKey key from the registered from the elements
engineLookupAndResolvePrivateKey
(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Method engineLookupAndResolvePrivateKey

public PublicKey

Returns:

resolved public key from the registered from the element.
engineLookupAndResolvePublicKey
(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Method engineLookupAndResolvePublicKey

public SecretKey

Returns:

resolved SecretKey key from the registered from the elements
engineLookupAndResolveSecretKey
(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Method engineLookupAndResolveSecretKey

public X509Certificate

Returns:

resolved X509Certificate key from the registered from the elements
engineLookupResolveX509Certificate
(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Method engineLookupResolveX509Certificate

protected abstract PrivateKey

Returns:

resolved PrivateKey key from the registered from the elements
engineResolvePrivateKey
(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Method engineResolvePrivateKey

protected abstract PublicKey

Returns:

resolved public key from the registered from the element.
engineResolvePublicKey
(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Method engineResolvePublicKey

protected abstract SecretKey

Returns:

resolved SecretKey key from the registered from the elements
engineResolveSecretKey
(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Method engineResolveSecretKey

protected abstract X509Certificate

Returns:

resolved X509Certificate key from the registered from the elements
engineResolveX509Certificate
(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Method engineResolveCertificate

protected static Element

Returns:

the Document Element after parsing bytes
getDocFromBytes
(byte[] bytes, boolean secureValidation)

Parses a byte array and returns the parsed Element.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

KeyResolverSpiback to summary
public KeyResolverSpi()

Method Detail

engineCanResolveback to summary
protected abstract boolean engineCanResolve(Element element, String baseURI, StorageResolver storage)

This method returns whether the KeyResolverSpi is able to perform the requested action.

Returns:boolean

whether the KeyResolverSpi is able to perform the requested action.

engineLookupAndResolvePrivateKeyback to summary
public PrivateKey engineLookupAndResolvePrivateKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Method engineLookupAndResolvePrivateKey

Returns:PrivateKey

resolved PrivateKey key from the registered from the elements

engineLookupAndResolvePublicKeyback to summary
public PublicKey engineLookupAndResolvePublicKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Method engineLookupAndResolvePublicKey

Returns:PublicKey

resolved public key from the registered from the element.

engineLookupAndResolveSecretKeyback to summary
public SecretKey engineLookupAndResolveSecretKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Method engineLookupAndResolveSecretKey

Returns:SecretKey

resolved SecretKey key from the registered from the elements

engineLookupResolveX509Certificateback to summary
public X509Certificate engineLookupResolveX509Certificate(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Method engineLookupResolveX509Certificate

Returns:X509Certificate

resolved X509Certificate key from the registered from the elements

engineResolvePrivateKeyback to summary
protected abstract PrivateKey engineResolvePrivateKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Method engineResolvePrivateKey

Returns:PrivateKey

resolved PrivateKey key from the registered from the elements

engineResolvePublicKeyback to summary
protected abstract PublicKey engineResolvePublicKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Method engineResolvePublicKey

Returns:PublicKey

resolved public key from the registered from the element.

engineResolveSecretKeyback to summary
protected abstract SecretKey engineResolveSecretKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Method engineResolveSecretKey

Returns:SecretKey

resolved SecretKey key from the registered from the elements

engineResolveX509Certificateback to summary
protected abstract X509Certificate engineResolveX509Certificate(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Method engineResolveCertificate

Returns:X509Certificate

resolved X509Certificate key from the registered from the elements

getDocFromBytesback to summary
protected static Element getDocFromBytes(byte[] bytes, boolean secureValidation) throws KeyResolverException

Parses a byte array and returns the parsed Element.

Returns:Element

the Document Element after parsing bytes

Exceptions
KeyResolverException:
if something goes wrong