Class EncryptedKeyResolver
- java.lang.Object
-
- org.apache.xml.security.keys.keyresolver.KeyResolverSpi
-
- org.apache.xml.security.keys.keyresolver.implementations.EncryptedKeyResolver
-
public class EncryptedKeyResolver extends KeyResolverSpi
TheEncryptedKeyResolver
is not a generic resolver. It can only be for specific instantiations, as the key being unwrapped will always be of a particular type and will always have been wrapped by another key which needs to be recursively resolved. TheEncryptedKeyResolver
can therefore only be instantiated with an algorithm. It can also be instantiated with a key (the KEK) or will search the static KeyResolvers to find the appropriate key.- Author:
- Berin Lautenbach
-
-
Field Summary
-
Fields inherited from class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
globalResolver, properties, secureValidation
-
-
Constructor Summary
Constructors Constructor Description EncryptedKeyResolver(String algorithm)
Constructor for use when a KEK needs to be derived from a KeyInfo listEncryptedKeyResolver(String algorithm, Key kek)
Constructor used for when a KEK has been set
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PublicKey
engineLookupAndResolvePublicKey(Element element, String baseURI, StorageResolver storage)
Method engineLookupAndResolvePublicKeySecretKey
engineLookupAndResolveSecretKey(Element element, String baseURI, StorageResolver storage)
Method engineLookupAndResolveSecretKeyX509Certificate
engineLookupResolveX509Certificate(Element element, String baseURI, StorageResolver storage)
Method engineLookupResolveX509Certificatevoid
registerInternalKeyResolver(KeyResolverSpi realKeyResolver)
This method is used to add a customKeyResolverSpi
to help resolve the KEK.-
Methods inherited from class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
engineCanResolve, engineGetProperty, engineLookupAndResolvePrivateKey, engineResolvePublicKey, engineResolveSecretKey, engineResolveX509Certificate, engineSetProperty, getDocFromBytes, setGlobalResolver, setSecureValidation, understandsProperty
-
-
-
-
Constructor Detail
-
EncryptedKeyResolver
public EncryptedKeyResolver(String algorithm)
Constructor for use when a KEK needs to be derived from a KeyInfo list- Parameters:
algorithm
-
-
-
Method Detail
-
registerInternalKeyResolver
public void registerInternalKeyResolver(KeyResolverSpi realKeyResolver)
This method is used to add a customKeyResolverSpi
to help resolve the KEK.- Parameters:
realKeyResolver
-
-
engineLookupAndResolvePublicKey
public PublicKey engineLookupAndResolvePublicKey(Element element, String baseURI, StorageResolver storage)
Description copied from class:KeyResolverSpi
Method engineLookupAndResolvePublicKey- Overrides:
engineLookupAndResolvePublicKey
in classKeyResolverSpi
- Returns:
- resolved public key from the registered from the element.
-
engineLookupResolveX509Certificate
public X509Certificate engineLookupResolveX509Certificate(Element element, String baseURI, StorageResolver storage)
Description copied from class:KeyResolverSpi
Method engineLookupResolveX509Certificate- Overrides:
engineLookupResolveX509Certificate
in classKeyResolverSpi
- Returns:
- resolved X509Certificate key from the registered from the elements
-
engineLookupAndResolveSecretKey
public SecretKey engineLookupAndResolveSecretKey(Element element, String baseURI, StorageResolver storage)
Description copied from class:KeyResolverSpi
Method engineLookupAndResolveSecretKey- Overrides:
engineLookupAndResolveSecretKey
in classKeyResolverSpi
- Returns:
- resolved SecretKey key from the registered from the elements
-
-