nssck.api
来自「支持SSL v2/v3, TLS, PKCS #5, PKCS #7, PKCS」· API 代码 · 共 1,890 行 · 第 1/3 页
API
1,890 行
/* THIS IS A GENERATED FILE *//* * The contents of this file are subject to the Mozilla Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is the Netscape security libraries. * * The Initial Developer of the Original Code is Netscape * Communications Corporation. Portions created by Netscape are * Copyright (C) 1994-2000 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the * terms of the GNU General Public License Version 2 or later (the * "GPL"), in which case the provisions of the GPL are applicable * instead of those above. If you wish to allow use of your * version of this file only under the terms of the GPL and not to * allow others to use your version of this file under the MPL, * indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by * the GPL. If you do not delete the provisions above, a recipient * may use your version of this file under either the MPL or the * GPL. */#ifdef DEBUGstatic const char NSSCKAPI_CVS_ID[] = "@(#) $RCSfile: nssck.api,v $ $Revision: 1.1.2.1 $ $Date: 2000/10/13 23:08:13 $ $Name: NSS_3_1_1_RTM $ ; @(#) $RCSfile: nssck.api,v $ $Revision: 1.1.2.1 $ $Date: 2000/10/13 23:08:13 $ $Name: NSS_3_1_1_RTM $";#endif /* DEBUG *//* * nssck.api * * This automatically-generated file is used to generate a set of * Cryptoki entry points within the object space of a Module using * the NSS Cryptoki Framework. * * The Module should have a .c file with the following: * * #define MODULE_NAME name * #define INSTANCE_NAME instance * #include "nssck.api" * * where "name" is some module-specific name that can be used to * disambiguate various modules. This included file will then * define the actual Cryptoki routines which pass through to the * Framework calls. All routines, except C_GetFunctionList, will * be prefixed with the name; C_GetFunctionList will be generated * to return an entry-point vector with these routines. The * instance specified should be the basic instance of NSSCKMDInstance. * * If, prior to including nssck.api, the .c file also specifies * * #define DECLARE_STRICT_CRYTPOKI_NAMES * * Then a set of "stub" routines not prefixed with the name will * be included. This would allow the combined module and framework * to be used in applications which are hard-coded to use the * PKCS#11 names (instead of going through the EPV). Please note * that such applications should be careful resolving symbols when * more than one PKCS#11 module is loaded. */#ifndef MODULE_NAME#error "Error: MODULE_NAME must be defined."#endif /* MODULE_NAME */#ifndef INSTANCE_NAME#error "Error: INSTANCE_NAME must be defined."#endif /* INSTANCE_NAME */#ifndef NSSCKT_H#include "nssckt.h"#endif /* NSSCKT_H */#ifndef NSSCKFWT_H#include "nssckfwt.h"#endif /* NSSCKFWT_H */#ifndef NSSCKFWC_H#include "nssckfwc.h"#endif /* NSSCKFWC_H */#ifndef NSSCKEPV_H#include "nssckepv.h"#endif /* NSSCKEPV_H */#define __ADJOIN(x,y) x##y/* * The anchor. This object is used to store an "anchor" pointer in * the Module's object space, so the wrapper functions can relate * back to this instance. */static NSSCKFWInstance *fwInstance = (NSSCKFWInstance *)0;CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_Initialize)( CK_VOID_PTR pInitArgs){ return NSSCKFWC_Initialize(&fwInstance, INSTANCE_NAME, pInitArgs);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRY C_Initialize( CK_VOID_PTR pInitArgs){ return __ADJOIN(MODULE_NAME,C_Initialize)(pInitArgs);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_Finalize)( CK_VOID_PTR pReserved){ return NSSCKFWC_Finalize(&fwInstance);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_Finalize( CK_VOID_PTR pReserved){ return __ADJOIN(MODULE_NAME,C_Finalize)(pReserved);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_GetInfo)( CK_INFO_PTR pInfo){ return NSSCKFWC_GetInfo(fwInstance, pInfo);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_GetInfo( CK_INFO_PTR pInfo){ return __ADJOIN(MODULE_NAME,C_GetInfo)(pInfo);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES *//* * C_GetFunctionList is defined at the end. */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_GetSlotList)( CK_BBOOL tokenPresent, CK_SLOT_ID_PTR pSlotList, CK_ULONG_PTR pulCount){ return NSSCKFWC_GetSlotList(fwInstance, tokenPresent, pSlotList, pulCount);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_GetSlotList( CK_BBOOL tokenPresent, CK_SLOT_ID_PTR pSlotList, CK_ULONG_PTR pulCount){ return __ADJOIN(MODULE_NAME,C_GetSlotList)(tokenPresent, pSlotList, pulCount);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_GetSlotInfo)( CK_SLOT_ID slotID, CK_SLOT_INFO_PTR pInfo){ return NSSCKFWC_GetSlotInfo(fwInstance, slotID, pInfo);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_GetSlotInfo( CK_SLOT_ID slotID, CK_SLOT_INFO_PTR pInfo){ return __ADJOIN(MODULE_NAME,C_GetSlotInfo)(slotID, pInfo);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_GetTokenInfo)( CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo){ return NSSCKFWC_GetTokenInfo(fwInstance, slotID, pInfo);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_GetTokenInfo( CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo){ return __ADJOIN(MODULE_NAME,C_GetTokenInfo)(slotID, pInfo);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_GetMechanismList)( CK_SLOT_ID slotID, CK_MECHANISM_TYPE_PTR pMechanismList, CK_ULONG_PTR pulCount){ return NSSCKFWC_GetMechanismList(fwInstance, slotID, pMechanismList, pulCount);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_GetMechanismList( CK_SLOT_ID slotID, CK_MECHANISM_TYPE_PTR pMechanismList, CK_ULONG_PTR pulCount){ return __ADJOIN(MODULE_NAME,C_GetMechanismList)(slotID, pMechanismList, pulCount);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_GetMechanismInfo)( CK_SLOT_ID slotID, CK_MECHANISM_TYPE type, CK_MECHANISM_INFO_PTR pInfo){ return NSSCKFWC_GetMechanismInfo(fwInstance, slotID, type, pInfo);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_GetMechanismInfo( CK_SLOT_ID slotID, CK_MECHANISM_TYPE type, CK_MECHANISM_INFO_PTR pInfo){ return __ADJOIN(MODULE_NAME,C_GetMechanismInfo)(slotID, type, pInfo);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_InitToken)( CK_SLOT_ID slotID, CK_CHAR_PTR pPin, CK_ULONG ulPinLen, CK_CHAR_PTR pLabel){ return NSSCKFWC_InitToken(fwInstance, slotID, pPin, ulPinLen, pLabel);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_InitToken( CK_SLOT_ID slotID, CK_CHAR_PTR pPin, CK_ULONG ulPinLen, CK_CHAR_PTR pLabel){ return __ADJOIN(MODULE_NAME,C_InitToken)(slotID, pPin, ulPinLen, pLabel);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_InitPIN)( CK_SESSION_HANDLE hSession, CK_CHAR_PTR pPin, CK_ULONG ulPinLen){ return NSSCKFWC_InitPIN(fwInstance, hSession, pPin, ulPinLen);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_InitPIN( CK_SESSION_HANDLE hSession, CK_CHAR_PTR pPin, CK_ULONG ulPinLen){ return __ADJOIN(MODULE_NAME,C_InitPIN)(hSession, pPin, ulPinLen);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_SetPIN)( CK_SESSION_HANDLE hSession, CK_CHAR_PTR pOldPin, CK_ULONG ulOldLen, CK_CHAR_PTR pNewPin, CK_ULONG ulNewLen){ return NSSCKFWC_SetPIN(fwInstance, hSession, pOldPin, ulOldLen, pNewPin, ulNewLen);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_SetPIN( CK_SESSION_HANDLE hSession, CK_CHAR_PTR pOldPin, CK_ULONG ulOldLen, CK_CHAR_PTR pNewPin, CK_ULONG ulNewLen){ return __ADJOIN(MODULE_NAME,C_SetPIN)(hSession, pOldPin, ulOldLen, pNewPin, ulNewLen);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_OpenSession)( CK_SLOT_ID slotID, CK_FLAGS flags, CK_VOID_PTR pApplication, CK_NOTIFY Notify, CK_SESSION_HANDLE_PTR phSession){ return NSSCKFWC_OpenSession(fwInstance, slotID, flags, pApplication, Notify, phSession);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_OpenSession( CK_SLOT_ID slotID, CK_FLAGS flags, CK_VOID_PTR pApplication, CK_NOTIFY Notify, CK_SESSION_HANDLE_PTR phSession){ return __ADJOIN(MODULE_NAME,C_OpenSession)(slotID, flags, pApplication, Notify, phSession);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_CloseSession)( CK_SESSION_HANDLE hSession){ return NSSCKFWC_CloseSession(fwInstance, hSession);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_CloseSession( CK_SESSION_HANDLE hSession){ return __ADJOIN(MODULE_NAME,C_CloseSession)(hSession);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_CloseAllSessions)( CK_SLOT_ID slotID){ return NSSCKFWC_CloseAllSessions(fwInstance, slotID);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_CloseAllSessions( CK_SLOT_ID slotID){ return __ADJOIN(MODULE_NAME,C_CloseAllSessions)(slotID);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_GetSessionInfo)( CK_SESSION_HANDLE hSession, CK_SESSION_INFO_PTR pInfo){ return NSSCKFWC_GetSessionInfo(fwInstance, hSession, pInfo);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_GetSessionInfo( CK_SESSION_HANDLE hSession, CK_SESSION_INFO_PTR pInfo){ return __ADJOIN(MODULE_NAME,C_GetSessionInfo)(hSession, pInfo);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_GetOperationState)( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pOperationState, CK_ULONG_PTR pulOperationStateLen){ return NSSCKFWC_GetOperationState(fwInstance, hSession, pOperationState, pulOperationStateLen);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_GetOperationState( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pOperationState, CK_ULONG_PTR pulOperationStateLen){ return __ADJOIN(MODULE_NAME,C_GetOperationState)(hSession, pOperationState, pulOperationStateLen);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_SetOperationState)( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pOperationState, CK_ULONG ulOperationStateLen, CK_OBJECT_HANDLE hEncryptionKey, CK_OBJECT_HANDLE hAuthenticationKey){ return NSSCKFWC_SetOperationState(fwInstance, hSession, pOperationState, ulOperationStateLen, hEncryptionKey, hAuthenticationKey);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_SetOperationState( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pOperationState, CK_ULONG ulOperationStateLen, CK_OBJECT_HANDLE hEncryptionKey, CK_OBJECT_HANDLE hAuthenticationKey){ return __ADJOIN(MODULE_NAME,C_SetOperationState)(hSession, pOperationState, ulOperationStateLen, hEncryptionKey, hAuthenticationKey);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_Login)( CK_SESSION_HANDLE hSession, CK_USER_TYPE userType, CK_CHAR_PTR pPin, CK_ULONG ulPinLen){ return NSSCKFWC_Login(fwInstance, hSession, userType, pPin, ulPinLen);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_Login( CK_SESSION_HANDLE hSession, CK_USER_TYPE userType, CK_CHAR_PTR pPin, CK_ULONG ulPinLen){ return __ADJOIN(MODULE_NAME,C_Login)(hSession, userType, pPin, ulPinLen);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_Logout)( CK_SESSION_HANDLE hSession){ return NSSCKFWC_Logout(fwInstance, hSession);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_Logout( CK_SESSION_HANDLE hSession){ return __ADJOIN(MODULE_NAME,C_Logout)(hSession);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_CreateObject)( CK_SESSION_HANDLE hSession, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount, CK_OBJECT_HANDLE_PTR phObject){ return NSSCKFWC_CreateObject(fwInstance, hSession, pTemplate, ulCount, phObject);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_CreateObject( CK_SESSION_HANDLE hSession, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount, CK_OBJECT_HANDLE_PTR phObject){ return __ADJOIN(MODULE_NAME,C_CreateObject)(hSession, pTemplate, ulCount, phObject);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_CopyObject)( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount, CK_OBJECT_HANDLE_PTR phNewObject){ return NSSCKFWC_CopyObject(fwInstance, hSession, hObject, pTemplate, ulCount, phNewObject);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_CopyObject( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount, CK_OBJECT_HANDLE_PTR phNewObject){ return __ADJOIN(MODULE_NAME,C_CopyObject)(hSession, hObject, pTemplate, ulCount, phNewObject);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_DestroyObject)( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject){ return NSSCKFWC_DestroyObject(fwInstance, hSession, hObject);}#ifdef DECLARE_STRICT_CRYPTOKI_NAMESCK_RV CK_ENTRYC_DestroyObject( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject){ return __ADJOIN(MODULE_NAME,C_DestroyObject)(hSession, hObject);}#endif /* DECLARE_STRICT_CRYPTOKI_NAMES */CK_RV CK_ENTRY__ADJOIN(MODULE_NAME,C_GetObjectSize)(
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?