GetSymmetricKeyExtendedOperation.java revision 83efeeb66bc183b219c55fb6b96f9f78e997e0ad
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
* add the following below this CDDL HEADER, with the fields enclosed
* by brackets "[]" replaced with your own identifying information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Portions Copyright 2007 Sun Microsystems, Inc.
*/
/**
* This class implements the get symmetric key extended operation, an OpenDS
* proprietary extension used for distribution of symmetric keys amongst
* servers.
*/
public class GetSymmetricKeyExtendedOperation
extends ExtendedOperationHandler<
{
/**
* The tracer object for the debug logger.
*/
/**
* The BER type value for the symmetric key element of the operation value.
*/
public static final byte TYPE_SYMMETRIC_KEY_ELEMENT = (byte) 0x80;
/**
* The BER type value for the instance key ID element of the operation value.
*/
public static final byte TYPE_INSTANCE_KEY_ID_ELEMENT = (byte) 0x81;
// The default set of supported control OIDs for this extended operation.
/**
* Create an instance of this symmetric key extended operation. All
* initialization should be performed in the
* <CODE>initializeExtendedOperationHandler</CODE> method.
*/
public GetSymmetricKeyExtendedOperation()
{
super();
}
/**
* {@inheritDoc}
*/
public void initializeExtendedOperationHandler(
{
}
/**
* Performs any finalization that may be necessary for this extended
* operation handler. By default, no finalization is performed.
*/
public void finalizeExtendedOperationHandler()
{
}
/**
* {@inheritDoc}
*/
@Override()
{
return supportedControlOIDs;
}
/**
* Processes the provided extended operation.
*
* @param operation The extended operation to be processed.
*/
{
// Initialize the variables associated with components that may be included
// in the request.
// Parse the encoded request, if there is one.
if (requestValue == null)
{
// The request must always have a value.
return;
}
try
{
{
switch (e.getType())
{
break;
break;
default:
return;
}
}
}
catch (ASN1Exception ae)
{
if (DebugLogger.debugEnabled())
{
}
ae.getMessage());
return;
}
catch (Exception e)
{
if (DebugLogger.debugEnabled())
{
}
return;
}
try
{
}
catch (CryptoManager.CryptoManagerException e)
{
}
catch (Exception e)
{
}
}
/**
* Encodes the provided information into an ASN.1 octet string suitable for
* use as the value for this extended operation.
*
* @param symmetricKey The wrapped key to use for this request control.
* @param instanceKeyID The requesting server instance key ID to use for
* this request control.
*
* @return An ASN.1 octet string containing the encoded request value.
*/
public static ASN1OctetString encodeRequestValue(
{
}
}