10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 58932SDina.Nimeh@Sun.COM * Common Development and Distribution License (the "License"). 68932SDina.Nimeh@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 228932SDina.Nimeh@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _SOFTGLOBAL_H 270Sstevel@tonic-gate #define _SOFTGLOBAL_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate #ifdef __cplusplus 300Sstevel@tonic-gate extern "C" { 310Sstevel@tonic-gate #endif 320Sstevel@tonic-gate 330Sstevel@tonic-gate #include <security/cryptoki.h> 340Sstevel@tonic-gate #include <security/pkcs11t.h> 350Sstevel@tonic-gate 360Sstevel@tonic-gate /* 370Sstevel@tonic-gate * The following global variables are defined in softGeneral.c 380Sstevel@tonic-gate */ 390Sstevel@tonic-gate extern boolean_t softtoken_initialized; 400Sstevel@tonic-gate extern pthread_mutex_t soft_giant_mutex; 410Sstevel@tonic-gate extern struct slot soft_slot; 420Sstevel@tonic-gate extern struct obj_to_be_freed_list obj_delay_freed; 430Sstevel@tonic-gate extern struct ses_to_be_freed_list ses_delay_freed; 44*10500SHai-May.Chao@Sun.COM extern int softtoken_fips_mode; 450Sstevel@tonic-gate 460Sstevel@tonic-gate #define SOFTTOKEN_SLOTID 1 470Sstevel@tonic-gate 480Sstevel@tonic-gate /* CK_INFO: Information about cryptoki */ 490Sstevel@tonic-gate #define CRYPTOKI_VERSION_MAJOR 2 50676Sizick #define CRYPTOKI_VERSION_MINOR 20 510Sstevel@tonic-gate #define LIBRARY_DESCRIPTION "Sun Crypto Softtoken " 520Sstevel@tonic-gate #define LIBRARY_VERSION_MAJOR 1 530Sstevel@tonic-gate #define LIBRARY_VERSION_MINOR 1 540Sstevel@tonic-gate 550Sstevel@tonic-gate 560Sstevel@tonic-gate /* CK_SLOT_INFO: Information about our slot */ 570Sstevel@tonic-gate #define HARDWARE_VERSION_MAJOR 0 580Sstevel@tonic-gate #define HARDWARE_VERSION_MINOR 0 590Sstevel@tonic-gate #define FIRMWARE_VERSION_MAJOR 0 600Sstevel@tonic-gate #define FIRMWARE_VERSION_MINOR 0 610Sstevel@tonic-gate 620Sstevel@tonic-gate /* CK_TOKEN_INFO: More information about token */ 630Sstevel@tonic-gate #define TOKEN_MODEL "1.0 " 640Sstevel@tonic-gate #define MAX_PIN_LEN 256 650Sstevel@tonic-gate #define MIN_PIN_LEN 1 660Sstevel@tonic-gate 670Sstevel@tonic-gate #define SOFT_TOKEN_FLAGS CKF_RNG|\ 680Sstevel@tonic-gate CKF_USER_PIN_INITIALIZED|\ 690Sstevel@tonic-gate CKF_LOGIN_REQUIRED|\ 700Sstevel@tonic-gate CKF_RESTORE_KEY_NOT_NEEDED|\ 710Sstevel@tonic-gate CKF_DUAL_CRYPTO_OPERATIONS|\ 720Sstevel@tonic-gate CKF_TOKEN_INITIALIZED 730Sstevel@tonic-gate 74*10500SHai-May.Chao@Sun.COM extern CK_RV soft_fips_post(void); 75*10500SHai-May.Chao@Sun.COM 760Sstevel@tonic-gate #ifdef __cplusplus 770Sstevel@tonic-gate } 780Sstevel@tonic-gate #endif 790Sstevel@tonic-gate 800Sstevel@tonic-gate #endif /* _SOFTGLOBAL_H */ 81