Module org.apache.santuario.xmlsec
Class X509DigestResolver
- java.lang.Object
-
- org.apache.xml.security.keys.keyresolver.KeyResolverSpi
-
- org.apache.xml.security.keys.keyresolver.implementations.X509DigestResolver
-
public class X509DigestResolver extends KeyResolverSpi
KeyResolverSpi implementation which resolves public keys and X.509 certificates from adsig11:X509Digestelement.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.System.LoggerLOG
-
Constructor Summary
Constructors Constructor Description X509DigestResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckStorage(StorageResolver storage)Method checkSrorageprotected booleanengineCanResolve(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage)This method returns whether the KeyResolverSpi is able to perform the requested action.protected java.security.PrivateKeyengineResolvePrivateKey(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)Method engineResolvePrivateKeyprotected java.security.PublicKeyengineResolvePublicKey(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)Method engineResolvePublicKeyprotected javax.crypto.SecretKeyengineResolveSecretKey(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)Method engineResolveSecretKeyprotected java.security.cert.X509CertificateengineResolveX509Certificate(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)Method engineResolveCertificateprivate java.security.cert.X509CertificateresolveCertificate(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage)Resolves from the storage resolver the actual certificate represented by the digest.-
Methods inherited from class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
engineLookupAndResolvePrivateKey, engineLookupAndResolvePublicKey, engineLookupAndResolveSecretKey, engineLookupResolveX509Certificate, getDocFromBytes
-
-
-
-
Method Detail
-
engineCanResolve
protected boolean engineCanResolve(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage)This method returns whether the KeyResolverSpi is able to perform the requested action.- Specified by:
engineCanResolvein classKeyResolverSpi- Returns:
- whether the KeyResolverSpi is able to perform the requested action.
-
engineResolvePublicKey
protected java.security.PublicKey engineResolvePublicKey(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverExceptionMethod engineResolvePublicKey- Specified by:
engineResolvePublicKeyin classKeyResolverSpi- Returns:
- resolved public key from the registered from the element.
- Throws:
KeyResolverException
-
engineResolveX509Certificate
protected java.security.cert.X509Certificate engineResolveX509Certificate(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverExceptionMethod engineResolveCertificate- Specified by:
engineResolveX509Certificatein classKeyResolverSpi- Returns:
- resolved X509Certificate key from the registered from the elements
- Throws:
KeyResolverException
-
engineResolveSecretKey
protected javax.crypto.SecretKey engineResolveSecretKey(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverExceptionMethod engineResolveSecretKey- Specified by:
engineResolveSecretKeyin classKeyResolverSpi- Returns:
- resolved SecretKey key from the registered from the elements
- Throws:
KeyResolverException
-
resolveCertificate
private java.security.cert.X509Certificate resolveCertificate(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage) throws XMLSecurityExceptionResolves from the storage resolver the actual certificate represented by the digest.- Parameters:
element-baseURI-storage-- Returns:
- the certificate represented by the digest.
- Throws:
XMLSecurityException
-
checkStorage
private void checkStorage(StorageResolver storage) throws KeyResolverException
Method checkSrorage- Parameters:
storage-- Throws:
KeyResolverException
-
engineResolvePrivateKey
protected java.security.PrivateKey engineResolvePrivateKey(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)Method engineResolvePrivateKey- Specified by:
engineResolvePrivateKeyin classKeyResolverSpi- Returns:
- resolved PrivateKey key from the registered from the elements
-
-