com.ibm.wsspi.wssecurity.config
Interface KeyLocator

All Superinterfaces:
Initializable
All Known Implementing Classes:
CertInRequestKeyLocator, KeyStoreKeyLocator

public interface KeyLocator
extends Initializable

Retrieves the key for signature and encryption, either with or without the abstract or concrete key "name" as a clue.


Method Summary
 java.security.cert.Certificate getCertificate(java.security.Key key)
          Returns a certificate object which corresponds to the specified key.
 java.security.cert.Certificate getCertificate(java.lang.String name)
          Returns a certificate object which corresponds to the given abstract or concrete key "name".
 java.security.Key getDecryptionKey(java.lang.String name, java.lang.Object context)
          Returns an decryption key.
 java.security.Key getEncryptionKey(java.lang.String name, java.lang.Object context)
          Returns an encryption key.
 java.lang.String getName(java.security.Key key)
          Returns a concrete key "name" which corresponds to the specified key.
 java.lang.String getName(java.lang.String name)
          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)
          Returns a Set object which contains all the concrete key "name"s.
 java.security.Key getSigningKey(java.lang.String name)
          Returns a signing key.
 java.security.Key getVerificationKey(java.lang.String name)
          Returns a verification key.
NOTE: This function is not implemented in current WS-Security runtime, because verification key is always embedded in the received message as <BinarySecurityToken>.
 
Methods inherited from interface com.ibm.wsspi.wssecurity.Initializable
init
 

Method Detail

getNames

public java.util.Set getNames(java.lang.Object context)
                       throws KeyLocatorException
Returns a Set object which contains all the concrete key "name"s.
Parameters:
context - Reserved for the future use.
Returns:
A Set object which contains all the concrete key "name"s.

getEncryptionKey

public java.security.Key getEncryptionKey(java.lang.String name,
                                          java.lang.Object context)
                                   throws KeyLocatorException
Returns an encryption key.
Parameters:
name - An abstract or concrete key "name".
context - Reserved for the future use.
Returns:
An encryption key.

getDecryptionKey

public java.security.Key getDecryptionKey(java.lang.String name,
                                          java.lang.Object context)
                                   throws KeyLocatorException
Returns an decryption key.
Parameters:
name - An abstract or concrete key "name".
context - Reserved for the future use.
Returns:
An decryption key.

getSigningKey

public java.security.Key getSigningKey(java.lang.String name)
                                throws KeyLocatorException
Returns a signing key.
Parameters:
name - An abstract or concrete key "name".
Returns:
A signing key.

getVerificationKey

public java.security.Key getVerificationKey(java.lang.String name)
                                     throws KeyLocatorException
Returns a verification key.
NOTE: This function is not implemented in current WS-Security runtime, because verification key is always embedded in the received message as <BinarySecurityToken>.
Parameters:
name - An abstract or concrete key "name".
Returns:
A verification key.

getName

public java.lang.String getName(java.security.Key key)
                         throws KeyLocatorException
Returns a concrete key "name" which corresponds to the specified key.
Parameters:
key - A key which can be retrieved through the KeyLocator object.
Returns:
A concrete key "name".

getCertificate

public java.security.cert.Certificate getCertificate(java.security.Key key)
                                              throws KeyLocatorException
Returns a certificate object which corresponds to the specified key.
Parameters:
key - A key which can be retrieved through the KeyLocator object.
Returns:
A certificate object.

getCertificate

public java.security.cert.Certificate getCertificate(java.lang.String name)
                                              throws KeyLocatorException
Returns a certificate object which corresponds to the given abstract or concrete key "name".
Parameters:
name - An abstract or concrete key "name".
Returns:
A certificate object.

getName

public java.lang.String getName(java.lang.String name)
                         throws KeyLocatorException
Returns a concrete key "name" which corresponds to the given abstract key "name", which is used as a value of the <KeyName> element.
Parameters:
name - An abstract key "name".
Returns:
A concrete key "name".