public class EncryptedKeyResolver extends KeyResolverSpi
EncryptedKeyResolver
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.
The EncryptedKeyResolver
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.Constructor and Description |
---|
EncryptedKeyResolver(String algorithm,
Key kek,
List<KeyResolverSpi> internalKeyResolvers)
Constructor used for when a KEK has been set
|
EncryptedKeyResolver(String algorithm,
List<KeyResolverSpi> internalKeyResolvers)
Constructor for use when a KEK needs to be derived from a KeyInfo
list
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
engineCanResolve(Element element,
String baseURI,
StorageResolver storage)
This method returns whether the KeyResolverSpi is able to perform the requested action.
|
protected PrivateKey |
engineResolvePrivateKey(Element element,
String baseURI,
StorageResolver storage,
boolean secureValidation)
Method engineResolvePrivateKey
|
protected PublicKey |
engineResolvePublicKey(Element element,
String baseURI,
StorageResolver storage,
boolean secureValidation)
Method engineResolvePublicKey
|
protected SecretKey |
engineResolveSecretKey(Element element,
String baseURI,
StorageResolver storage,
boolean secureValidation)
Method engineResolveSecretKey
|
protected X509Certificate |
engineResolveX509Certificate(Element element,
String baseURI,
StorageResolver storage,
boolean secureValidation)
Method engineResolveCertificate
|
engineLookupAndResolvePrivateKey, engineLookupAndResolvePublicKey, engineLookupAndResolveSecretKey, engineLookupResolveX509Certificate, getDocFromBytes
public EncryptedKeyResolver(String algorithm, List<KeyResolverSpi> internalKeyResolvers)
algorithm
- internalKeyResolvers
- public EncryptedKeyResolver(String algorithm, Key kek, List<KeyResolverSpi> internalKeyResolvers)
algorithm
- kek
- internalKeyResolvers
- protected boolean engineCanResolve(Element element, String baseURI, StorageResolver storage)
engineCanResolve
in class KeyResolverSpi
protected PublicKey engineResolvePublicKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation)
engineResolvePublicKey
in class KeyResolverSpi
protected X509Certificate engineResolveX509Certificate(Element element, String baseURI, StorageResolver storage, boolean secureValidation)
engineResolveX509Certificate
in class KeyResolverSpi
protected SecretKey engineResolveSecretKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation)
engineResolveSecretKey
in class KeyResolverSpi
protected PrivateKey engineResolvePrivateKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation)
engineResolvePrivateKey
in class KeyResolverSpi
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.