2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A /* Obtain the session pointer. */ 2N/A /* Obtain the object pointer. */ 2N/A /* Check to see if key object supports signature. */ 2N/A /* Check to see if sign operation is already active. */ 2N/A /* free the memory to avoid memory leak */ 2N/A * This active flag will remain ON until application calls either 2N/A * C_Sign or C_SignFinal to actually obtain the signature. 2N/A /* Obtain the session pointer */ 2N/A /* Application must call C_SignInit before calling C_Sign. */ 2N/A * C_Sign must be called without intervening C_SignUpdate 2N/A * C_Sign can not be used to terminate a multi-part 2N/A * operation, so we'll leave the active sign operation 2N/A * flag on and let the application continue with the 2N/A * sign update operation. 2N/A * We will not terminate the active sign operation flag, 2N/A * when the application-supplied buffer is too small, or 2N/A * the application asks for the length of buffer to hold 2N/A /* Clear contexts, free key, and release session counter */ 2N/A /* Obtain the session pointer */ 2N/A * Application must call C_SignInit before calling 2N/A /* After error, clear context, free key, & release session counter */ 2N/A /* Obtain the session pointer */ 2N/A * Application must call C_SignInit before calling 2N/A * We will not terminate the active sign operation flag, 2N/A * when the application-supplied buffer is too small, or 2N/A * the application asks for the length of buffer to hold 2N/A /* Clear contexts, free key, and release session counter */ 2N/A /* Obtain the session pointer. */ 2N/A /* Obtain the object pointer. */ 2N/A /* Check to see if key object supports sign_recover. */ 2N/A /* Check to see if sign operation is already active. */ 2N/A /* free the memory to avoid memory leak */ 2N/A * This active flag will remain ON until application calls either 2N/A * C_SignRecover to actually obtain the signature. 2N/A /* Obtain the session pointer */ 2N/A /* Application must call C_SignRecoverInit before C_SignRecover. */ 2N/A * We will not terminate the active sign operation flag, 2N/A * when the application-supplied buffer is too small, or 2N/A * the application asks for the length of buffer to hold 2N/A /* Clear contexts, free key, and release session counter */