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
KeyResolverSpi implementation which resolves public keys and X.509 certificates from a
dsig11:X509Digest element.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckStorage(StorageResolver storage) Method checkSrorageprotected booleanengineCanResolve(Element element, String baseURI, StorageResolver storage) This method returns whether the KeyResolverSpi is able to perform the requested action.protected PrivateKeyengineResolvePrivateKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) Method engineResolvePrivateKeyprotected PublicKeyengineResolvePublicKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) Method engineResolvePublicKeyprotected SecretKeyengineResolveSecretKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) Method engineResolveSecretKeyprotected X509CertificateengineResolveX509Certificate(Element element, String baseURI, StorageResolver storage, boolean secureValidation) Method engineResolveCertificateprivate X509CertificateresolveCertificate(Element element, 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
-
Field Details
-
LOG
-
-
Constructor Details
-
X509DigestResolver
public X509DigestResolver()
-
-
Method Details
-
engineCanResolve
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 PublicKey engineResolvePublicKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException Method engineResolvePublicKey- Specified by:
engineResolvePublicKeyin classKeyResolverSpi- Returns:
- resolved public key from the registered from the element.
- Throws:
KeyResolverException
-
engineResolveX509Certificate
protected X509Certificate engineResolveX509Certificate(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException Method engineResolveCertificate- Specified by:
engineResolveX509Certificatein classKeyResolverSpi- Returns:
- resolved X509Certificate key from the registered from the elements
- Throws:
KeyResolverException
-
engineResolveSecretKey
protected SecretKey engineResolveSecretKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException Method engineResolveSecretKey- Specified by:
engineResolveSecretKeyin classKeyResolverSpi- Returns:
- resolved SecretKey key from the registered from the elements
- Throws:
KeyResolverException
-
resolveCertificate
private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException Resolves 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
Method checkSrorage- Parameters:
storage-- Throws:
KeyResolverException
-
engineResolvePrivateKey
protected PrivateKey engineResolvePrivateKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) Method engineResolvePrivateKey- Specified by:
engineResolvePrivateKeyin classKeyResolverSpi- Returns:
- resolved PrivateKey key from the registered from the elements
-