ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * CDDL HEADER START
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * The contents of this file are subject to the terms of the
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * Common Development and Distribution License (the "License").
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * You may not use this file except in compliance with the License.
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * See the License for the specific language governing permissions
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * and limitations under the License.
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * When distributing Covered Code, include this CDDL HEADER in each
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * If applicable, add the following below this CDDL HEADER, with the
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * fields enclosed by brackets "[]" replaced with your own identifying
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * information: Portions Copyright [yyyy] [name of copyright owner]
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * CDDL HEADER END
4df55fde49134f9735f84011f23a767c75e393c7Janie Lu * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna * Use is subject to license terms.
ba5f469c0173c4d47f377c20b530f5be165d49dckrishnaextern "C" {
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna#define SLOT_THRESHOLD(sp) (slot_table[sp->ses_slotid]->sl_threshold)
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna#define SLOT_HAS_LIMITED_HASH(sp) (slot_table[sp->ses_slotid]->sl_flags & \
4df55fde49134f9735f84011f23a767c75e393c7Janie Lu#define SLOT_HAS_LIMITED_HMAC(sp) (slot_table[sp->ses_slotid]->sl_flags & \
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna#define get_sp(opp) (((digest_buf_t *)((opp)->context))->soft_sp)
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna#define get_spp(opp) (&(((digest_buf_t *)((opp)->context))->soft_sp))
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna/* reinit buffer so that we can reuse it */
b2a962217309a877fd63575155d80ad56aca8071krishnaCK_RV emulate_buf_init(kernel_session_t *session_p, int buflen, int opflag);
ba5f469c0173c4d47f377c20b530f5be165d49dckrishnaCK_RV emulate_init(kernel_session_t *session_p, CK_MECHANISM_PTR pMechanism,
ba5f469c0173c4d47f377c20b530f5be165d49dckrishnaCK_RV emulate_update(kernel_session_t *session_p, CK_BYTE_PTR pPart,
ba5f469c0173c4d47f377c20b530f5be165d49dckrishna#endif /* _KERNEL_EMULATE_H */