org.opends.server.crypto
Class GetSymmetricKeyExtendedOperation

java.lang.Object
  extended by org.opends.server.api.ExtendedOperationHandler<GetSymmetricKeyExtendedOperationHandlerCfg>
      extended by org.opends.server.crypto.GetSymmetricKeyExtendedOperation

public class GetSymmetricKeyExtendedOperation
extends ExtendedOperationHandler<GetSymmetricKeyExtendedOperationHandlerCfg>

This class implements the get symmetric key extended operation, an OpenDS proprietary extension used for distribution of symmetric keys amongst servers.


Field Summary
static byte TYPE_INSTANCE_KEY_ID_ELEMENT
          The BER type value for the instance key ID element of the operation value.
static byte TYPE_SYMMETRIC_KEY_ELEMENT
          The BER type value for the symmetric key element of the operation value.
 
Constructor Summary
GetSymmetricKeyExtendedOperation()
          Create an instance of this symmetric key extended operation.
 
Method Summary
static ASN1OctetString encodeRequestValue(java.lang.String symmetricKey, java.lang.String instanceKeyID)
          Encodes the provided information into an ASN.1 octet string suitable for use as the value for this extended operation.
 void finalizeExtendedOperationHandler()
          Performs any finalization that may be necessary for this extended operation handler.
 java.util.Set<java.lang.String> getSupportedControls()
          Retrieves the OIDs of the controls that may be supported by this extended operation handler.
 void initializeExtendedOperationHandler(GetSymmetricKeyExtendedOperationHandlerCfg config)
          Initializes this extended operation handler based on the information in the provided configuration entry.
 void processExtendedOperation(ExtendedOperation operation)
          Processes the provided extended operation.
 
Methods inherited from class org.opends.server.api.ExtendedOperationHandler
deregisterControlsAndFeatures, getSupportedFeatures, isConfigurationAcceptable, registerControlsAndFeatures, supportsControl, supportsFeature
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_SYMMETRIC_KEY_ELEMENT

public static final byte TYPE_SYMMETRIC_KEY_ELEMENT
The BER type value for the symmetric key element of the operation value.

See Also:
Constant Field Values

TYPE_INSTANCE_KEY_ID_ELEMENT

public static final byte TYPE_INSTANCE_KEY_ID_ELEMENT
The BER type value for the instance key ID element of the operation value.

See Also:
Constant Field Values
Constructor Detail

GetSymmetricKeyExtendedOperation

public GetSymmetricKeyExtendedOperation()
Create an instance of this symmetric key extended operation. All initialization should be performed in the initializeExtendedOperationHandler method.

Method Detail

initializeExtendedOperationHandler

public void initializeExtendedOperationHandler(GetSymmetricKeyExtendedOperationHandlerCfg config)
                                        throws ConfigException,
                                               InitializationException
Initializes this extended operation handler based on the information in the provided configuration entry. It should also register itself with the Directory Server for the particular kinds of extended operations that it will process.

Specified by:
initializeExtendedOperationHandler in class ExtendedOperationHandler<GetSymmetricKeyExtendedOperationHandlerCfg>
Parameters:
config - The extended operation handler configuration that contains the information to use to initialize this extended operation handler.
Throws:
ConfigException - If an unrecoverable problem arises in the process of performing the initialization.
InitializationException - If a problem occurs during initialization that is not related to the server configuration.

finalizeExtendedOperationHandler

public void finalizeExtendedOperationHandler()
Performs any finalization that may be necessary for this extended operation handler. By default, no finalization is performed.

Overrides:
finalizeExtendedOperationHandler in class ExtendedOperationHandler<GetSymmetricKeyExtendedOperationHandlerCfg>

getSupportedControls

public java.util.Set<java.lang.String> getSupportedControls()
Retrieves the OIDs of the controls that may be supported by this extended operation handler. It should be overridden by any extended operation handler which provides special support for one or more controls.

Overrides:
getSupportedControls in class ExtendedOperationHandler<GetSymmetricKeyExtendedOperationHandlerCfg>
Returns:
The OIDs of the controls that may be supported by this extended operation handler.

processExtendedOperation

public void processExtendedOperation(ExtendedOperation operation)
Processes the provided extended operation.

Specified by:
processExtendedOperation in class ExtendedOperationHandler<GetSymmetricKeyExtendedOperationHandlerCfg>
Parameters:
operation - The extended operation to be processed.

encodeRequestValue

public static ASN1OctetString encodeRequestValue(java.lang.String symmetricKey,
                                                 java.lang.String instanceKeyID)
Encodes the provided information into an ASN.1 octet string suitable for use as the value for this extended operation.

Parameters:
symmetricKey - The wrapped key to use for this request control.
instanceKeyID - The requesting server instance key ID to use for this request control.
Returns:
An ASN.1 octet string containing the encoded request value.