1 #ifndef __DIGI_DOC_PKCS11_H__ 2 #define __DIGI_DOC_PKCS11_H__ 25 #include <libdigidoc/DigiDocDefs.h> 33 #define LIBHANDLE HANDLE 34 #include "pkcs11/cryptoki.h" 37 #define LIBHANDLE void* 38 #include "pkcs11/pkcs11.h" 43 #include <libdigidoc/DigiDocLib.h> 44 #include <openssl/ocsp.h> 47 EXP_OPTION LIBHANDLE initPKCS11Library(
const char* libName);
48 EXP_OPTION
void closePKCS11Library(LIBHANDLE pLibrary, CK_SESSION_HANDLE hSession);
50 int slot,
const char* passwd);
52 EXP_OPTION CK_RV GetSlotIds(CK_SLOT_ID_PTR pSlotids, CK_ULONG_PTR pLen);
53 EXP_OPTION CK_RV GetTokenInfo(CK_TOKEN_INFO_PTR pTokInfo, CK_SLOT_ID
id);
54 int loadAndTestDriver(
const char* driver, LIBHANDLE* pLibrary, CK_SLOT_ID* slotids,
55 int slots, CK_ULONG slot);
56 EXP_OPTION CK_RV getDriverInfo(CK_INFO_PTR pInfo);
57 EXP_OPTION CK_RV GetSlotInfo(CK_SLOT_INFO_PTR pSlotInfo, CK_SLOT_ID
id);
69 EXP_OPTION
int decryptWithEstID(
int slot,
const char* pin,
70 const char* encData,
int encLen,
71 char* decData,
int *decLen);
79 EXP_OPTION
int findUsersCertificate(
int slot, X509** ppCert);
85 #endif // __DIGI_DOC_PKCS11_H__ Definition: DigiDocObj.h:154
Definition: DigiDocObj.h:177