Class SecretKeyResolver
- java.lang.Object
-
- org.apache.xml.security.keys.keyresolver.KeyResolverSpi
-
- org.apache.xml.security.keys.keyresolver.implementations.SecretKeyResolver
-
public class SecretKeyResolver extends KeyResolverSpi
Resolves a SecretKey within a KeyStore based on the KeyName. The KeyName is the key entry alias within the KeyStore.
-
-
Field Summary
-
Fields inherited from class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
globalResolver, properties, secureValidation
-
-
Constructor Summary
Constructors Constructor Description SecretKeyResolver(KeyStore keyStore, char[] password)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanengineCanResolve(Element element, String baseURI, StorageResolver storage)This method returns whether the KeyResolverSpi is able to perform the requested action.PrivateKeyengineLookupAndResolvePrivateKey(Element element, String baseURI, StorageResolver storage)Method engineResolvePrivateKeyPublicKeyengineLookupAndResolvePublicKey(Element element, String baseURI, StorageResolver storage)Method engineLookupAndResolvePublicKeyX509CertificateengineLookupResolveX509Certificate(Element element, String baseURI, StorageResolver storage)Method engineResolveX509CertificateSecretKeyengineResolveSecretKey(Element element, String baseURI, StorageResolver storage)Method engineResolveSecretKey-
Methods inherited from class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
engineGetProperty, engineLookupAndResolveSecretKey, engineResolvePublicKey, engineResolveX509Certificate, engineSetProperty, getDocFromBytes, setGlobalResolver, setSecureValidation, understandsProperty
-
-
-
-
Constructor Detail
-
SecretKeyResolver
public SecretKeyResolver(KeyStore keyStore, char[] password)
Constructor.
-
-
Method Detail
-
engineCanResolve
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage)
This method returns whether the KeyResolverSpi is able to perform the requested action.- Overrides:
engineCanResolvein classKeyResolverSpi- Parameters:
element-baseURI-storage-- Returns:
- whether the KeyResolverSpi is able to perform the requested action.
-
engineLookupAndResolvePublicKey
public PublicKey engineLookupAndResolvePublicKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException
Method engineLookupAndResolvePublicKey- Overrides:
engineLookupAndResolvePublicKeyin classKeyResolverSpi- Parameters:
element-baseURI-storage-- Returns:
- null if no
PublicKeycould be obtained - Throws:
KeyResolverException
-
engineLookupResolveX509Certificate
public X509Certificate engineLookupResolveX509Certificate(Element element, String baseURI, StorageResolver storage) throws KeyResolverException
Method engineResolveX509Certificate- Overrides:
engineLookupResolveX509Certificatein classKeyResolverSpi- Returns:
- resolved X509Certificate key from the registered from the elements
- Throws:
KeyResolverException
-
engineResolveSecretKey
public SecretKey engineResolveSecretKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException
Method engineResolveSecretKey- Overrides:
engineResolveSecretKeyin classKeyResolverSpi- Parameters:
element-baseURI-storage-- Returns:
- resolved SecretKey key or null if no
SecretKeycould be obtained - Throws:
KeyResolverException
-
engineLookupAndResolvePrivateKey
public PrivateKey engineLookupAndResolvePrivateKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException
Method engineResolvePrivateKey- Overrides:
engineLookupAndResolvePrivateKeyin classKeyResolverSpi- Returns:
- resolved PrivateKey key from the registered from the elements
- Throws:
KeyResolverException
-
-