public class KeyStoreKeyLocator extends java.lang.Object implements KeyLocator
KeyStore
object.
This class accepts key store and key information. Key information consists
of three pieces: abstract key "name", alias in the key store and optional
key password (in case the key is not public one). These values are specified
in WS-Security configuration XMI files and passed to init
method as encoded name-value pairs.
| Constructor and Description |
|---|
KeyStoreKeyLocator()
Deprecated.
Invoked by WS-Security runtime.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInit()
Deprecated.
|
static java.lang.String |
encodedName(java.lang.String dn)
Deprecated.
Encodes and normalizes a DName string to some degree.
|
java.security.cert.Certificate |
getCertificate(java.security.Key key)
Deprecated.
Returns a certificate object which corresponds to the specified
key.
|
java.security.cert.Certificate |
getCertificate(java.lang.String name)
Deprecated.
Returns a certificate object which corresponds to the given
abstract or concrete key "name".
|
protected java.security.Key |
getConfidentialKey(java.lang.String name,
java.lang.Object context)
Deprecated.
Returns either private key or shared key.
|
java.security.Key |
getDecryptionKey(java.lang.String name,
java.lang.Object context)
Deprecated.
Returns an decryption key.
|
protected java.lang.String |
getDefaultBasePath()
Deprecated.
Reserved for the future use.
|
java.security.Key |
getEncryptionKey(java.lang.String name,
java.lang.Object context)
Deprecated.
Returns an encryption key.
|
java.lang.String |
getName(java.security.Key key)
Deprecated.
Returns a concrete key "name" which corresponds to the
specified key.
|
java.lang.String |
getName(java.lang.String name)
Deprecated.
Returns a concrete key "name" which corresponds to the given
abstract key "name", which is used as a value of the
<KeyName> element.
|
java.util.Set |
getNames(java.lang.Object context)
Deprecated.
Returns a
Set object which contains all the
concrete key "name"s. |
java.security.Key |
getSigningKey(java.lang.String name)
Deprecated.
Returns a signing key.
|
java.security.Key |
getVerificationKey(java.lang.String name)
Deprecated.
Returns a verification key.
|
void |
init(java.util.Map map)
Deprecated.
Initializes the object.
|
public KeyStoreKeyLocator()
protected java.lang.String getDefaultBasePath()
public void init(java.util.Map map)
throws SoapSecurityException
Initializableinit in interface Initializablemap - a Map object which contains name-value pairs.
These pairs are specified in <Property> elements in
the configuration XMI files.SoapSecurityExceptionprotected void doInit()
throws KeyLocatorException
KeyLocatorExceptionpublic java.util.Set getNames(java.lang.Object context)
throws KeyLocatorException
KeyLocatorSet object which contains all the
concrete key "name"s.getNames in interface KeyLocatorcontext - Reserved for the future use.Set object which contains all the
concrete key "name"s.KeyLocatorExceptionprotected java.security.Key getConfidentialKey(java.lang.String name,
java.lang.Object context)
throws KeyLocatorException
name - An abstract key "name".context - Reserved for the future use.KeyLocatorExceptionpublic java.security.Key getEncryptionKey(java.lang.String name,
java.lang.Object context)
throws KeyLocatorException
KeyLocatorgetEncryptionKey in interface KeyLocatorname - An abstract or concrete key "name".context - Reserved for the future use.KeyLocatorExceptionpublic java.security.Key getDecryptionKey(java.lang.String name,
java.lang.Object context)
throws KeyLocatorException
KeyLocatorgetDecryptionKey in interface KeyLocatorname - An abstract or concrete key "name".context - Reserved for the future use.KeyLocatorExceptionpublic java.security.Key getSigningKey(java.lang.String name)
throws KeyLocatorException
KeyLocatorgetSigningKey in interface KeyLocatorname - An abstract or concrete key "name".KeyLocatorExceptionpublic java.security.Key getVerificationKey(java.lang.String name)
throws KeyLocatorException
KeyLocatorNOTE: This function is not implemented in current WS-Security runtime, because verification key is always embedded in the received message as <BinarySecurityToken>.
getVerificationKey in interface KeyLocatorname - An abstract or concrete key "name".KeyLocatorExceptionpublic java.lang.String getName(java.security.Key key)
throws KeyLocatorException
KeyLocatorgetName in interface KeyLocatorkey - A key which can be retrieved through the
KeyLocator object.KeyLocatorExceptionpublic java.security.cert.Certificate getCertificate(java.security.Key key)
throws KeyLocatorException
KeyLocatorgetCertificate in interface KeyLocatorkey - A key which can be retrieved through the
KeyLocator object.KeyLocatorExceptionpublic java.security.cert.Certificate getCertificate(java.lang.String name)
throws KeyLocatorException
KeyLocatorgetCertificate in interface KeyLocatorname - An abstract or concrete key "name".KeyLocatorExceptionpublic static java.lang.String encodedName(java.lang.String dn)
throws KeyLocatorException
dn - A DName string.KeyLocatorExceptionpublic java.lang.String getName(java.lang.String name)
throws KeyLocatorException
getName in interface KeyLocatorname - An abstract key "name".KeyLocatorException