Eneboo - Documentación para desarrolladores
'defines' | Funciones | Variables
Referencia del Archivo src/libdigidoc/DigiDocConfig.c
#include <libdigidoc/DigiDocConfig.h>
#include <libdigidoc/DigiDocPKCS11.h>
#include <libdigidoc/DigiDocDebug.h>
#include <libdigidoc/DigiDocCert.h>
#include <libdigidoc/DigiDocObj.h>
#include <libdigidoc/DigiDocOCSP.h>
#include <libdigidoc/DigiDocConvert.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <string.h>

'defines'

#define DIGIDOC_CONF_NAME   "digidoc.conf"
#define HOME_ENV   "HOME"
#define DIGIDOC_CONF_FMT   "%s/.%s"
#define _MAX_PATH   200

Funciones

int ConfigItem_new (ConfigItem **pItem, const char *key, const char *value, int type, int status)
void ConfigItem_free (ConfigItem *pItem)
ConfigItemConfigItem_find (const char *key)
EXP_OPTION int initConfigStore (const char *szConfigFile)
EXP_OPTION void cleanupConfigStore (ConfigurationStore *pConfStore)
EXP_OPTION int addConfigItem (ConfigurationStore *pConfStore, const char *key, const char *value, int type, int status)
EXP_OPTION int createOrReplacePrivateConfigItem (ConfigurationStore *pConfStore, const char *key, const char *value)
EXP_OPTION int ConfigItem_delete (const char *key)
int ConfigItem_findByPrefix (ConfigurationStore *pConfStore, const char *prefix)
EXP_OPTION const char * ConfigItem_lookup (const char *key)
EXP_OPTION const char * ConfigItem_lookup_fromStore (ConfigurationStore *pConfStore, const char *key)
EXP_OPTION int ConfigItem_lookup_int (const char *key, int defValue)
EXP_OPTION int ConfigItem_lookup_bool (const char *key, int defValue)
EXP_OPTION int readConfigFile (const char *fileName, int type)
EXP_OPTION int writeConfigFile (const char *fileName, int type)
EXP_OPTION int writePrivateConfigFile ()
EXP_OPTION void setPrivateConfigFile (const char *fileName)
int findCAindexByCN (int *idx, const char *cn)
int findResponderIndex (int *idx, const char *cn, const char *hash, const char *ca)
EXP_OPTION int findCAForCN (X509 **ppCA, const char *szCN)
EXP_OPTION int findResponderByCNAndHashAndIndex (X509 **ppResp, const char *szCN, const char *hash, int nIdx)
EXP_OPTION int findResponder (X509 **ppResp, const char *szCN, const char *szHash, char *szCertSerial)
EXP_OPTION int findResponderCA (char *caCN, int len, const char *szCN, const char *hash)
EXP_OPTION int findCAForCertificate (X509 **ppCA, const X509 *pCert)
EXP_OPTION int findCAChainForCN (X509 **ppChain, int *nMaxChain, const char *szCN)
EXP_OPTION int notarizeSignature (SignedDoc *pSigDoc, SignatureInfo *pSigInfo)
int ddocSelectOcspUrl (char *issuerDN, char **ppOcspUrl)
int ddocFindCaChainForCert (X509 *pCert, X509 **caCerts, int *nCerts, char *szCA, int caLen)
int ddocFindOcspCnCaAndCerts (OCSP_RESPONSE *pResp, int *nType, X509 **caCerts, int *nCerts, char *szCN, int cnLen, char *szCA, int caLen)
EXP_OPTION int notarizeSignatureWithIp (SignedDoc *pSigDoc, SignatureInfo *pSigInfo, unsigned long ip)
EXP_OPTION int signDocument (SignedDoc *pSigDoc, SignatureInfo **ppSigInfo, const char *pin, const char *manifest, const char *city, const char *state, const char *zip, const char *country)
int verifyNotary (SignedDoc *pSigDoc, SignatureInfo *pSigInfo, NotaryInfo *pNotInfo)
EXP_OPTION int verifySignatureAndNotary (SignedDoc *pSigDoc, SignatureInfo *pSigInfo, const char *szFileName)
int findCN (char *src, char *dest)
EXP_OPTION int ddocVerifyCertByOCSP (X509 *pCert, OCSP_RESPONSE **ppResp)
EXP_OPTION int ddocVerifyCertByOCSPWithIp (X509 *pCert, OCSP_RESPONSE **ppResp, unsigned long ip)
EXP_OPTION int ddocReadFile (const char *szFileName, DigiDocMemBuf *pData)

Variables

char g_szGlobalConfigFile [] = "/" DIGIDOC_CONF_NAME
char g_szPrivateConfigFile [_MAX_PATH]
ConfigurationStore g_configStore

Documentación de los 'defines'

#define _MAX_PATH   200
#define DIGIDOC_CONF_FMT   "%s/.%s"
#define DIGIDOC_CONF_NAME   "digidoc.conf"
#define HOME_ENV   "HOME"

Documentación de las funciones

EXP_OPTION int addConfigItem ( ConfigurationStore pConfStore,
const char *  key,
const char *  value,
int  type,
int  status 
)
EXP_OPTION void cleanupConfigStore ( ConfigurationStore pConfStore)
EXP_OPTION int ConfigItem_delete ( const char *  key)
ConfigItem * ConfigItem_find ( const char *  key)
int ConfigItem_findByPrefix ( ConfigurationStore pConfStore,
const char *  prefix 
)
void ConfigItem_free ( ConfigItem pItem)
EXP_OPTION const char* ConfigItem_lookup ( const char *  key)
EXP_OPTION int ConfigItem_lookup_bool ( const char *  key,
int  defValue 
)
EXP_OPTION const char* ConfigItem_lookup_fromStore ( ConfigurationStore pConfStore,
const char *  key 
)
EXP_OPTION int ConfigItem_lookup_int ( const char *  key,
int  defValue 
)
int ConfigItem_new ( ConfigItem **  pItem,
const char *  key,
const char *  value,
int  type,
int  status 
)
EXP_OPTION int createOrReplacePrivateConfigItem ( ConfigurationStore pConfStore,
const char *  key,
const char *  value 
)
int ddocFindCaChainForCert ( X509 pCert,
X509 **  caCerts,
int nCerts,
char *  szCA,
int  caLen 
)
int ddocFindOcspCnCaAndCerts ( OCSP_RESPONSE pResp,
int nType,
X509 **  caCerts,
int nCerts,
char *  szCN,
int  cnLen,
char *  szCA,
int  caLen 
)
EXP_OPTION int ddocReadFile ( const char *  szFileName,
DigiDocMemBuf pData 
)
int ddocSelectOcspUrl ( char *  issuerDN,
char **  ppOcspUrl 
)
EXP_OPTION int ddocVerifyCertByOCSP ( X509 pCert,
OCSP_RESPONSE **  ppResp 
)
EXP_OPTION int ddocVerifyCertByOCSPWithIp ( X509 pCert,
OCSP_RESPONSE **  ppResp,
unsigned long  ip 
)
EXP_OPTION int findCAChainForCN ( X509 **  ppChain,
int nMaxChain,
const char *  szCN 
)
EXP_OPTION int findCAForCertificate ( X509 **  ppCA,
const X509 pCert 
)
EXP_OPTION int findCAForCN ( X509 **  ppCA,
const char *  szCN 
)
int findCAindexByCN ( int idx,
const char *  cn 
)
int findCN ( char *  src,
char *  dest 
)
EXP_OPTION int findResponder ( X509 **  ppResp,
const char *  szCN,
const char *  szHash,
char *  szCertSerial 
)
EXP_OPTION int findResponderByCNAndHashAndIndex ( X509 **  ppResp,
const char *  szCN,
const char *  hash,
int  nIdx 
)
EXP_OPTION int findResponderCA ( char *  caCN,
int  len,
const char *  szCN,
const char *  hash 
)
int findResponderIndex ( int idx,
const char *  cn,
const char *  hash,
const char *  ca 
)
EXP_OPTION int initConfigStore ( const char *  szConfigFile)
EXP_OPTION int notarizeSignature ( SignedDoc pSigDoc,
SignatureInfo pSigInfo 
)
EXP_OPTION int notarizeSignatureWithIp ( SignedDoc pSigDoc,
SignatureInfo pSigInfo,
unsigned long  ip 
)
EXP_OPTION int readConfigFile ( const char *  fileName,
int  type 
)
EXP_OPTION void setPrivateConfigFile ( const char *  fileName)
EXP_OPTION int signDocument ( SignedDoc pSigDoc,
SignatureInfo **  ppSigInfo,
const char *  pin,
const char *  manifest,
const char *  city,
const char *  state,
const char *  zip,
const char *  country 
)
int verifyNotary ( SignedDoc pSigDoc,
SignatureInfo pSigInfo,
NotaryInfo pNotInfo 
)
EXP_OPTION int verifySignatureAndNotary ( SignedDoc pSigDoc,
SignatureInfo pSigInfo,
const char *  szFileName 
)
EXP_OPTION int writeConfigFile ( const char *  fileName,
int  type 
)
EXP_OPTION int writePrivateConfigFile ( )

Documentación de las variables

char g_szGlobalConfigFile[] = "/" DIGIDOC_CONF_NAME
char g_szPrivateConfigFile[_MAX_PATH]
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'