/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* 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 usr/src/OPENSOLARIS.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
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _KERNEL_SLOT_H
#define _KERNEL_SLOT_H
#ifdef __cplusplus
extern "C" {
#endif
#include "kernelSession.h"
typedef struct cipher_mechs_threshold {
int mech_type;
/*
* This slot has limited hash support. It can not do multi-part
* hashing (updates).
*/
/*
* This slot has limited hmac support. It can not do multi-part
* hmac (updates).
*/
typedef struct kernel_slot {
/*
* The valid values are defined above.
*/
/*
* The maximum input data that can be digested by this slot.
* Used only if CRYPTO_LIMITED_HASH_SUPPORT is set in sl_flags.
*/
int sl_hash_max_inlen;
/*
* The maximum input data that can be hmac'ed by this slot.
* Used only if CRYPTO_LIMITED_HMAC_SUPPORT is set in sl_flags.
*/
int sl_hmac_max_inlen;
/*
* The threshold for input data size. We use this slot
* only if data size is at or above this value. Used only if
* CRYPTO_LIMITED_HASH_SUPPORT or CRYPTO_LIMITED_HMAC_SUPPORT is set.
*/
int sl_threshold;
extern CK_ULONG slot_count;
extern kernel_slot_t **slot_table;
/*
* Function Prototypes.
*/
#ifdef __cplusplus
}
#endif
#endif /* _KERNEL_SLOT_H */