Module org.apache.santuario.xmlsec
Class RetrievalMethodResolver
java.lang.Object
org.apache.xml.security.keys.keyresolver.KeyResolverSpi
org.apache.xml.security.keys.keyresolver.implementations.RetrievalMethodResolver
public class RetrievalMethodResolver
extends org.apache.xml.security.keys.keyresolver.KeyResolverSpi
The RetrievalMethodResolver can retrieve public keys and certificates from
other locations. The location is specified using the ds:RetrievalMethod
element which points to the location. This includes the handling of raw
(binary) X.509 certificate which are not encapsulated in an XML structure.
If the retrieval process encounters an element which the
RetrievalMethodResolver cannot handle itself, resolving of the extracted
element is delegated back to the KeyResolver mechanism.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanengineCanResolve(Element element, String baseURI, org.apache.xml.security.keys.storage.StorageResolver storage) This method returns whether the KeyResolverSpi is able to perform the requested action.protected PrivateKeyengineResolvePrivateKey(Element element, String baseURI, org.apache.xml.security.keys.storage.StorageResolver storage, boolean secureValidation) Method engineResolvePrivateKeyprotected PublicKeyengineResolvePublicKey(Element element, String baseURI, org.apache.xml.security.keys.storage.StorageResolver storage, boolean secureValidation) Method engineResolvePublicKeyengineResolveSecretKey(Element element, String baseURI, org.apache.xml.security.keys.storage.StorageResolver storage, boolean secureValidation) Method engineResolveSecretKeyprotected X509CertificateengineResolveX509Certificate(Element element, String baseURI, org.apache.xml.security.keys.storage.StorageResolver storage, boolean secureValidation) Method engineResolveCertificateMethods inherited from class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
engineLookupAndResolvePrivateKey, engineLookupAndResolvePublicKey, engineLookupAndResolveSecretKey, engineLookupResolveX509Certificate, getDocFromBytes
-
Constructor Details
-
RetrievalMethodResolver
public RetrievalMethodResolver()
-
-
Method Details
-
engineCanResolve
protected boolean engineCanResolve(Element element, String baseURI, org.apache.xml.security.keys.storage.StorageResolver storage) This method returns whether the KeyResolverSpi is able to perform the requested action.- Specified by:
engineCanResolvein classorg.apache.xml.security.keys.keyresolver.KeyResolverSpi- Parameters:
element-baseURI-storage-- Returns:
- whether the KeyResolverSpi is able to perform the requested action.
-
engineResolvePublicKey
protected PublicKey engineResolvePublicKey(Element element, String baseURI, org.apache.xml.security.keys.storage.StorageResolver storage, boolean secureValidation) Method engineResolvePublicKey- Specified by:
engineResolvePublicKeyin classorg.apache.xml.security.keys.keyresolver.KeyResolverSpi- Parameters:
element-baseURI-storage-secureValidation-- Returns:
- resolved public key from the registered from the element.
-
engineResolveX509Certificate
protected X509Certificate engineResolveX509Certificate(Element element, String baseURI, org.apache.xml.security.keys.storage.StorageResolver storage, boolean secureValidation) Method engineResolveCertificate- Specified by:
engineResolveX509Certificatein classorg.apache.xml.security.keys.keyresolver.KeyResolverSpi- Parameters:
element-baseURI-storage-secureValidation-- Returns:
- resolved X509Certificate key from the registered from the elements
-
engineResolveSecretKey
public SecretKey engineResolveSecretKey(Element element, String baseURI, org.apache.xml.security.keys.storage.StorageResolver storage, boolean secureValidation) Method engineResolveSecretKey- Specified by:
engineResolveSecretKeyin classorg.apache.xml.security.keys.keyresolver.KeyResolverSpi- Parameters:
element-baseURI-storage-secureValidation-- Returns:
- resolved SecretKey key from the registered from the elements
-
engineResolvePrivateKey
protected PrivateKey engineResolvePrivateKey(Element element, String baseURI, org.apache.xml.security.keys.storage.StorageResolver storage, boolean secureValidation) Method engineResolvePrivateKey- Specified by:
engineResolvePrivateKeyin classorg.apache.xml.security.keys.keyresolver.KeyResolverSpi- Parameters:
element-baseURI-storage-secureValidation-- Returns:
- resolved PrivateKey key from the registered from the elements
-