APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations

public Class RetrievalMethodResolver

extends KeyResolverSpi
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, java.security.PrivateKey, .PublicKey, java.security.cert.CertificateException, .CertificateFactory, .X509Certificate, java.util.ArrayList, .List, .ListIterator, .Set, com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException, com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException, com.sun.org.apache.xml.internal.security.keys.content.RetrievalMethod, com.sun.org.apache.xml.internal.security.keys.content.x509.XMLX509Certificate, com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolver, .KeyResolverException, .KeyResolverSpi, 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.signature.XMLSignatureInput, com.sun.org.apache.xml.internal.security.transforms.Transforms, com.sun.org.apache.xml.internal.security.utils.Constants, .XMLUtils, com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver, .ResourceResolverContext, org.w3c.dom.Attr, .Element, .Node

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.

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected boolean
engineCanResolve(Element element, String baseURI, StorageResolver storage)

Implements abstract com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineCanResolve.

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

protected PrivateKey
engineResolvePrivateKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Implements abstract com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolvePrivateKey.

Method engineResolvePrivateKey

protected PublicKey
engineResolvePublicKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Implements abstract com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolvePublicKey.

Method engineResolvePublicKey

public SecretKey
engineResolveSecretKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Implements abstract com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolveSecretKey.

Method engineResolveSecretKey

protected X509Certificate
engineResolveX509Certificate(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Implements abstract com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolveX509Certificate.

Method engineResolveCertificate

private static Element
private static X509Certificate
private static Element
obtainReferenceElement(XMLSignatureInput resource, boolean secureValidation)

private static X509Certificate

Returns:

a x509Certificate from the given information
resolveCertificate
(Element e, String baseURI, StorageResolver storage, boolean secureValidation)

Retrieves a x509Certificate from the given information

private static XMLSignatureInput

Returns:

the input from the given retrieval method
resolveInput
(RetrievalMethod rm, String baseURI, boolean secureValidation)

Resolves the input from the given retrieval method

private static PublicKey

Returns:

a PublicKey from the given information
resolveKey
(Element e, String baseURI, StorageResolver storage, boolean secureValidation)

Retrieves a PublicKey from the given information

Inherited from com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi:
engineLookupAndResolvePrivateKeyengineLookupAndResolvePublicKeyengineLookupAndResolveSecretKeyengineLookupResolveX509CertificategetDocFromBytes

Field Detail

LOGback to summary
private static final Logger LOG

Constructor Detail

RetrievalMethodResolverback to summary
public RetrievalMethodResolver()

Method Detail

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

Implements abstract com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineCanResolve.

Doc from com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineCanResolve.

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

Annotations
@Override
engineResolvePrivateKeyback to summary
protected PrivateKey engineResolvePrivateKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Implements abstract com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolvePrivateKey.

Doc from com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolvePrivateKey.

Method engineResolvePrivateKey

Annotations
@Override
engineResolvePublicKeyback to summary
protected PublicKey engineResolvePublicKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Implements abstract com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolvePublicKey.

Doc from com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolvePublicKey.

Method engineResolvePublicKey

Annotations
@Override
engineResolveSecretKeyback to summary
public SecretKey engineResolveSecretKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Implements abstract com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolveSecretKey.

Doc from com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolveSecretKey.

Method engineResolveSecretKey

Annotations
@Override
engineResolveX509Certificateback to summary
protected X509Certificate engineResolveX509Certificate(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Implements abstract com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolveX509Certificate.

Doc from com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi.engineResolveX509Certificate.

Method engineResolveCertificate

Annotations
@Override
getDocumentElementback to summary
private static Element getDocumentElement(Set<Node> set)
getRawCertificateback to summary
private static X509Certificate getRawCertificate(XMLSignatureInput resource) throws CanonicalizationException, IOException, CertificateException
obtainReferenceElementback to summary
private static Element obtainReferenceElement(XMLSignatureInput resource, boolean secureValidation) throws CanonicalizationException, XMLParserException, IOException, KeyResolverException
resolveCertificateback to summary
private static X509Certificate resolveCertificate(Element e, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Retrieves a x509Certificate from the given information

Returns:X509Certificate

a x509Certificate from the given information

resolveInputback to summary
private static XMLSignatureInput resolveInput(RetrievalMethod rm, String baseURI, boolean secureValidation) throws XMLSecurityException

Resolves the input from the given retrieval method

Returns:XMLSignatureInput

the input from the given retrieval method

resolveKeyback to summary
private static PublicKey resolveKey(Element e, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Retrieves a PublicKey from the given information

Returns:PublicKey

a PublicKey from the given information