Eneboo - Documentación para desarrolladores
|
#include "DigiDocPKCS11.h"
#include "DigiDocConfig.h"
#include "DigiDocDebug.h"
#include "DigiDocCert.h"
#include "DigiDocGen.h"
#include <stdio.h>
#include <string.h>
'defines' | |
#define | INVALID_SLOTIID 1000 |
Funciones | |
X509_ALGOR * | setSignAlgorithm (const EVP_MD *type) |
EXP_OPTION LIBHANDLE | initPKCS11Library (const char *libName) |
EXP_OPTION void | closePKCS11Library (LIBHANDLE pLibrary, CK_SESSION_HANDLE hSession) |
EXP_OPTION CK_RV | GetSlotIds (CK_SLOT_ID_PTR pSlotids, CK_ULONG_PTR pLen) |
EXP_OPTION CK_RV | GetTokenInfo (CK_TOKEN_INFO_PTR pTokInfo, CK_SLOT_ID id) |
EXP_OPTION CK_RV | GetSlotInfo (CK_SLOT_INFO_PTR pSlotInfo, CK_SLOT_ID id) |
int | loadAndTestDriver (const char *driver, LIBHANDLE *pLibrary, CK_SLOT_ID *slotids, int slots, CK_ULONG slot) |
CK_SESSION_HANDLE | OpenSession (CK_SLOT_ID slotId, const char *pin) |
CK_RV | SignData (CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hPrivateKey, CK_BYTE *Signature, CK_ULONG *ulSignatureLen, CK_BYTE *sigData, CK_ULONG dataLen) |
CK_OBJECT_HANDLE | LocateCertificate (CK_SESSION_HANDLE hSession, CK_BYTE_PTR certData, CK_ULONG_PTR certLen, char idData[20][20], CK_ULONG idLen[20], int *pSelKey) |
CK_RV | LocatePrivateKey (CK_SESSION_HANDLE hSession, char idData[20][20], CK_ULONG idLen[20], CK_OBJECT_HANDLE_PTR hKeys) |
int | ddocLocateSlotWithSignatureCert (LIBHANDLE pLibrary, CK_SLOT_ID *slotids, CK_SLOT_ID *pSlotId, char *pLabel, CK_ULONG nLabelLen) |
void | dumpInFile (const char *fileName, const char *data) |
EXP_OPTION int | calculateSignatureWithEstID (SignedDoc *pSigDoc, SignatureInfo *pSigInfo, int slot, const char *passwd) |
EXP_OPTION CK_RV | getDriverInfo (CK_INFO_PTR pInfo) |
EXP_OPTION int | decryptWithEstID (int slot, const char *pin, const char *encData, int encLen, char *decData, int *decLen) |
EXP_OPTION int | findUsersCertificate (int slot, X509 **ppCert) |
#define INVALID_SLOTIID 1000 |
EXP_OPTION int calculateSignatureWithEstID | ( | SignedDoc * | pSigDoc, |
SignatureInfo * | pSigInfo, | ||
int | slot, | ||
const char * | passwd | ||
) |
EXP_OPTION void closePKCS11Library | ( | LIBHANDLE | pLibrary, |
CK_SESSION_HANDLE | hSession | ||
) |
int ddocLocateSlotWithSignatureCert | ( | LIBHANDLE | pLibrary, |
CK_SLOT_ID * | slotids, | ||
CK_SLOT_ID * | pSlotId, | ||
char * | pLabel, | ||
CK_ULONG | nLabelLen | ||
) |
EXP_OPTION int decryptWithEstID | ( | int | slot, |
const char * | pin, | ||
const char * | encData, | ||
int | encLen, | ||
char * | decData, | ||
int * | decLen | ||
) |
void dumpInFile | ( | const char * | fileName, |
const char * | data | ||
) |
EXP_OPTION CK_RV getDriverInfo | ( | CK_INFO_PTR | pInfo | ) |
EXP_OPTION CK_RV GetSlotIds | ( | CK_SLOT_ID_PTR | pSlotids, |
CK_ULONG_PTR | pLen | ||
) |
EXP_OPTION CK_RV GetSlotInfo | ( | CK_SLOT_INFO_PTR | pSlotInfo, |
CK_SLOT_ID | id | ||
) |
EXP_OPTION CK_RV GetTokenInfo | ( | CK_TOKEN_INFO_PTR | pTokInfo, |
CK_SLOT_ID | id | ||
) |
EXP_OPTION LIBHANDLE initPKCS11Library | ( | const char * | libName | ) |
int loadAndTestDriver | ( | const char * | driver, |
LIBHANDLE * | pLibrary, | ||
CK_SLOT_ID * | slotids, | ||
int | slots, | ||
CK_ULONG | slot | ||
) |
CK_OBJECT_HANDLE LocateCertificate | ( | CK_SESSION_HANDLE | hSession, |
CK_BYTE_PTR | certData, | ||
CK_ULONG_PTR | certLen, | ||
char | idData[20][20], | ||
CK_ULONG | idLen[20], | ||
int * | pSelKey | ||
) |
CK_RV LocatePrivateKey | ( | CK_SESSION_HANDLE | hSession, |
char | idData[20][20], | ||
CK_ULONG | idLen[20], | ||
CK_OBJECT_HANDLE_PTR | hKeys | ||
) |
CK_SESSION_HANDLE OpenSession | ( | CK_SLOT_ID | slotId, |
const char * | pin | ||
) |
X509_ALGOR* setSignAlgorithm | ( | const EVP_MD * | type | ) |
CK_RV SignData | ( | CK_SESSION_HANDLE | hSession, |
CK_OBJECT_HANDLE | hPrivateKey, | ||
CK_BYTE * | Signature, | ||
CK_ULONG * | ulSignatureLen, | ||
CK_BYTE * | sigData, | ||
CK_ULONG | dataLen | ||
) |