Eneboo - Documentación para desarrolladores
src/libdigidoc/ts/DigiDocTS.h
Ir a la documentación de este archivo.
00001 #ifndef __DIGIDOC_TS_H__
00002 #define __DIGIDOC_TS_H__
00003 //==================================================
00004 // FILE:        DigiDocTS.h
00005 // PROJECT:     Digi Doc Encryption
00006 // DESCRIPTION: DigiDoc timestamping routines
00007 // AUTHOR:  Veiko Sinivee, S|E|B IT Partner Estonia
00008 //==================================================
00009 // Copyright (C) AS Sertifitseerimiskeskus
00010 // This library is free software; you can redistribute it and/or
00011 // modify it under the terms of the GNU Lesser General Public
00012 // License as published by the Free Software Foundation; either
00013 // version 2.1 of the License, or (at your option) any later version.
00014 // This library is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 // Lesser General Public License for more details.
00018 // GNU Lesser General Public Licence is available at
00019 // http://www.gnu.org/copyleft/lesser.html
00020 //==========< HISTORY >=============================
00021 //      10.04.2006      Veiko Sinivee
00022 //                      Creation
00023 //==================================================
00024 
00025 #include <libdigidoc/DigiDocDefs.h>
00026 #include <libdigidoc/DigiDocMem.h>
00027 //#include <libdigidoc/DigiDocObj.h>
00028 
00029 #ifdef  __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 #include <openssl/ts.h>
00034 
00035 //==========< glocal constants >=============
00036 
00037 #define TS_TYPE_ALL_DATA_OBJECTS               "AllDataObjectsTimeStamp"
00038 #define TS_TYPE_INDIVIDUAL_DATA_OBJECTS        "IndividualDataObjectsTimeStamp"
00039 #define TS_TYPE_SIGNATURE                      "SignatureTimeStamp"
00040 #define TS_TYPE_SIG_AND_REFS                   "SigAndRefsTimeStamp"
00041 #define TS_TYPE_REFS_ONLY                      "RefsOnlyTimeStamp"
00042 #define TS_TYPE_ARCHIVE                        "ArchiveTimeStamp"
00043 
00044 #define ID_TS_TYPE_ALL_DATA_OBJECTS            1
00045 #define ID_TS_TYPE_INDIVIDUAL_DATA_OBJECTS     2
00046 #define ID_TS_TYPE_SIGNATURE                   3
00047 #define ID_TS_TYPE_SIG_AND_REFS                4
00048 #define ID_TS_TYPE_REFS_ONLY                   5
00049 #define ID_TS_TYPE_ARCHIVE                     6
00050 
00051 //==========< structures >===================
00052 
00053 typedef struct IncludeInfo_st {
00054   char* szURI;          // URI atribute value
00055   int   referencedData; // referencedData atribute value
00056   // no Transforms used currently
00057 } IncludeInfo;
00058 
00059 typedef struct TimestampInfo_st {
00060   char* szId;          // Id atribute value if present
00061   char* szType;        // Type atribute value if present
00062   char* szCanonicalizationMethod; // CanonicalizationMethod element
00063   DigiDocMemBuf mbufTS; // timestamp data
00064   DigiDocMemBuf mbufRealDigest; // digest calculated over xml as read from file
00065   // list of IncludeInfo-s
00066   int nIncludeInfos;
00067   IncludeInfo** pIncludeInfos;
00068 } TimestampInfo;
00069 
00070 typedef struct TimestampInfoList_st {
00071   int nTimestampInfos;
00072   TimestampInfo** pTimestampInfos;
00073 } TimestampInfoList;
00074 
00075 //==========< IncludeInfo >========================
00076 
00077 //--------------------------------------------------
00078 // "Constructor" of IncludeInfo object
00079 // pTimestampInfo - parent object [REQUIRED]
00080 // ppIncludeInfo - address of buffer for newly allocated object [REQUIRED]
00081 // szURI - hashed object uri [REQUIRED]
00082 // returns error code or ERR_OK
00083 //--------------------------------------------------
00084 EXP_OPTION int ddocIncludeInfo_new(TimestampInfo* pTimestampInfo, 
00085                                     IncludeInfo** ppIncludeInfo, const char* szURI);
00086 
00087 //--------------------------------------------------
00088 // "Destructor" of IncludeInfo object
00089 // pIncludeInfo - address of object to be deleted [REQUIRED]
00090 // returns error code or ERR_OK
00091 //--------------------------------------------------
00092 EXP_OPTION int ddocIncludeInfo_free(IncludeInfo* pIncludeInfo);
00093 
00094 //--------------------------------------------------
00095 // Accessor for URI atribute of IncludeInfo object.
00096 // pIncludeInfo - address of object [REQUIRED]
00097 // returns value of atribute or NULL.
00098 //--------------------------------------------------
00099 EXP_OPTION const char* ddocIncludeInfo_GetURI(const IncludeInfo* pIncludeInfo);
00100 
00101 //--------------------------------------------------
00102 // Mutatoror for Id atribute of IncludeInfo object.
00103 // pIncludeInfo - address of object [REQUIRED]
00104 // value - new value for atribute [REQUIRED]
00105 // returns error code or ERR_OK
00106 //--------------------------------------------------
00107 EXP_OPTION int ddocIncludeInfo_SetURI(IncludeInfo* pIncludeInfo, const char* value);
00108 
00109 //==========< TimestampInfo >========================
00110 
00111 //--------------------------------------------------
00112 // "Constructor" of TimestampInfo object
00113 // pTimestampInfoList - parent object [REQUIRED]
00114 // ppTimestampInfo - address of buffer for newly allocated object [REQUIRED]
00115 // szId - timestamp id [OPTIONAL]
00116 // szType - timestamp type [REQUIRED]
00117 // returns error code or ERR_OK
00118 //--------------------------------------------------
00119 EXP_OPTION int ddocTimestampInfo_new(TimestampInfoList* pTimestampInfoList,
00120                                      TimestampInfo** ppTimestampInfo, 
00121                                      const char* szId, const char* szType);
00122 
00123 //--------------------------------------------------
00124 // "Destructor" of TimestampInfo object
00125 // pTimestampInfo - address of object to be deleted [REQUIRED]
00126 // returns error code or ERR_OK
00127 //--------------------------------------------------
00128 EXP_OPTION int ddocTimestampInfo_free(TimestampInfo* pTimestampInfo);
00129 
00130 //--------------------------------------------------
00131 // Accessor for Id atribute of TimestampInfo object.
00132 // pTimestampInfo - address of object [REQUIRED]
00133 // returns value of atribute or NULL.
00134 //--------------------------------------------------
00135 EXP_OPTION const char* ddocTimestampInfo_GetId(const TimestampInfo* pTimestampInfo);
00136 
00137 //--------------------------------------------------
00138 // Mutatoror for Id atribute of TimestampInfo object.
00139 // pTimestampInfo - address of object [REQUIRED]
00140 // value - new value for atribute [REQUIRED]
00141 // returns error code or ERR_OK
00142 //--------------------------------------------------
00143 EXP_OPTION int ddocTimestampInfo_SetId(TimestampInfo* pTimestampInfo, const char* value);
00144 
00145 //--------------------------------------------------
00146 // Accessor for Type atribute of TimestampInfo object.
00147 // pTimestampInfo - address of object [REQUIRED]
00148 // returns value of atribute or NULL.
00149 //--------------------------------------------------
00150 EXP_OPTION const char* ddocTimestampInfo_GetType(const TimestampInfo* pTimestampInfo);
00151 
00152 //--------------------------------------------------
00153 // Mutatoror for Type atribute of TimestampInfo object.
00154 // pTimestampInfo - address of object [REQUIRED]
00155 // value - new value for atribute [REQUIRED]
00156 // returns error code or ERR_OK
00157 //--------------------------------------------------
00158 EXP_OPTION int ddocTimestampInfo_SetType(TimestampInfo* pTimestampInfo, const char* value);
00159 
00160 //--------------------------------------------------
00161 // Accessor for Timestamp data of TimestampInfo object.
00162 // pTimestampInfo - address of object [REQUIRED]
00163 // returns value of atribute or NULL.
00164 //--------------------------------------------------
00165 EXP_OPTION const DigiDocMemBuf* ddocTimestampInfo_GetTS(const TimestampInfo* pTimestampInfo);
00166 
00167 //--------------------------------------------------
00168 // Mutatoror for Timestamp data of TimestampInfo object.
00169 // pTimestampInfo - address of object [REQUIRED]
00170 // value - new value for atribute [REQUIRED]
00171 // len - length of value in bytes [REQUIRED]
00172 // returns error code or ERR_OK
00173 //--------------------------------------------------
00174 EXP_OPTION int ddocTimestampInfo_SetTS(TimestampInfo* pTimestampInfo, 
00175                                        const char* value, long len);
00176 
00177 //--------------------------------------------------
00178 // Accessor for real digest value of TimestampInfo object.
00179 // pTimestampInfo - address of object [REQUIRED]
00180 // returns value of atribute or NULL.
00181 //--------------------------------------------------
00182 EXP_OPTION const DigiDocMemBuf* ddocTimestampInfo_GetRealDigest(const TimestampInfo* pTimestampInfo);
00183 
00184 //--------------------------------------------------
00185 // Mutatoror for real digest data of TimestampInfo object.
00186 // pTimestampInfo - address of object [REQUIRED]
00187 // value - new value for atribute [REQUIRED]
00188 // len - length of value in bytes [REQUIRED]
00189 // returns error code or ERR_OK
00190 //--------------------------------------------------
00191 EXP_OPTION int ddocTimestampInfo_SetRealDigest(TimestampInfo* pTimestampInfo, 
00192                                        const char* value, long len);
00193 
00194 //--------------------------------------------------
00195 // Accessor for count of IncludeInfos subelement of TimestampInfo object.
00196 // pTimestampInfo - pointer to TimestampInfo object [REQUIRED]
00197 // returns count or -1 for error. Then use error API to check errors
00198 //--------------------------------------------------
00199 EXP_OPTION int ddocTimestampInfo_GetIncludeInfosCount(const TimestampInfo* pTimestampInfo);
00200 
00201 //--------------------------------------------------
00202 // Accessor for IncludeInfos subelement of TimestampInfo object.
00203 // pTimestampInfo - pointer to TimestampInfo object [REQUIRED]
00204 // nIdx - index of IncludeInfo object [REQUIRED]
00205 // returns IncludeInfo pointer or NULL for error
00206 //--------------------------------------------------
00207 EXP_OPTION IncludeInfo* ddocTimestampInfo_GetIncludeInfo(const TimestampInfo* pTimestampInfo, int nIdx);
00208 
00209 //--------------------------------------------------
00210 // Accessor for last IncludeInfos subelement of TimestampInfo object.
00211 // pTimestampInfo - pointer to TimestampInfo object [REQUIRED]
00212 // returns IncludeInfo pointer or NULL for error
00213 //--------------------------------------------------
00214 EXP_OPTION IncludeInfo* ddocTimestampInfo_GetLastIncludeInfo(const TimestampInfo* pTimestampInfo);
00215 
00216 //--------------------------------------------------
00217 // Deletes IncludeInfo subelement of TimestampInfo object.
00218 // pTimestampInfo - pointer to TimestampInfo object [REQUIRED]
00219 // nIdx - index of IncludeInfo object to be removed [REQUIRED]
00220 // returns error code or ERR_OK
00221 //--------------------------------------------------
00222 EXP_OPTION int ddocTimestampInfo_DeleteIncludeInfo(TimestampInfo* pTimestampInfo, int nIdx);
00223 
00224 //--------------------------------------------------
00225 // Adds an IncludeInfo subelement to TimestampInfo object.
00226 // pTimestampInfo - pointer to TimestampInfo object [REQUIRED]
00227 // szURI - URI atribute of IncludeInfo object to be added [REQUIRED]
00228 // returns error code or ERR_OK
00229 //--------------------------------------------------
00230 EXP_OPTION int ddocTimestampInfo_AddIncludeInfo(TimestampInfo* pTimestampInfo, const char* szURI);
00231 
00232 //--------------------------------------------------
00233 // Generates XML for <TimestampInfo> element
00234 // pTimestampInfo - TimestampInfo object [REQUIRED]
00235 // pBuf - memory buffer for storing xml [REQUIRED]
00236 // returns error code or ERR_OK
00237 //--------------------------------------------------
00238 int ddocTimestampInfo_toXML(const TimestampInfo* pTimestampInfo, DigiDocMemBuf* pBuf);
00239 
00240 //==========< TimestampInfoList >====================
00241 
00242 //--------------------------------------------------
00243 // "Constructor" of TimestampInfoList object
00244 // ppTimestampInfoList - address of buffer for newly allocated object [REQUIRED]
00245 // returns error code or ERR_OK
00246 //--------------------------------------------------
00247 EXP_OPTION int ddocTimestampInfoList_new(TimestampInfoList** ppTimestampInfoList);
00248 
00249 //--------------------------------------------------
00250 // "Destructor" of TimestampInfoList object
00251 // pTimestampInfoList - address of object to be deleted [REQUIRED]
00252 // returns error code or ERR_OK
00253 //--------------------------------------------------
00254 EXP_OPTION int ddocTimestampInfoList_free(TimestampInfoList* pTimestampInfoList);
00255 
00256 //--------------------------------------------------
00257 // Accessor for count of TimestampInfos subelement of TimestampInfoList object.
00258 // pTimestampInfoList - pointer to TimestampInfoList object [REQUIRED]
00259 // returns count or -1 for error. Then use error API to check errors
00260 //--------------------------------------------------
00261 EXP_OPTION int ddocTimestampInfoList_GetTimestampInfosCount(const TimestampInfoList* pTimestampInfoList);
00262 
00263 //--------------------------------------------------
00264 // Accessor for TimestampInfos subelement of TimestampInfoList object.
00265 // pTimestampInfoList - pointer to TimestampInfoList object [REQUIRED]
00266 // nIdx - index of TimestampInfo object [REQUIRED]
00267 // returns TimestampInfo pointer or NULL for error
00268 //--------------------------------------------------
00269 EXP_OPTION TimestampInfo* ddocTimestampInfoList_GetTimestampInfo(const TimestampInfoList* pTimestampInfoList, int nIdx);
00270 
00271 //--------------------------------------------------
00272 // Deletes TimestampInfo subelement of TimestampInfoList object.
00273 // pTimestampInfoList - pointer to TimestampInfoList object [REQUIRED]
00274 // nIdx - index of TimestampInfo object to be removed [REQUIRED]
00275 // returns error code or ERR_OK
00276 //--------------------------------------------------
00277 EXP_OPTION int ddocTimestampInfoList_DeleteTimestampInfo(TimestampInfoList* pTimestampInfoList, int nIdx);
00278 
00279 //--------------------------------------------------
00280 // Returns the TimestampInfo with required type
00281 // pTimestampInfoList - pointer to TimestampInfoList object [REQUIRED]
00282 // szType - type of TimestampInfo object [REQUIRED]
00283 // returns TimestampInfo pointer or NULL for error
00284 //--------------------------------------------------
00285 EXP_OPTION TimestampInfo* ddocTimestampInfoList_GetTimestampInfoOfType(const TimestampInfoList* pTimestampInfoList, const char* szType);
00286 
00287 //--------------------------------------------------
00288 // Returns the TimestampInfo with required type.
00289 // Creates one if it doesn't exist yet.
00290 // pTimestampInfoList - pointer to TimestampInfoList object [REQUIRED]
00291 // szType - type of TimestampInfo object [REQUIRED]
00292 // returns TimestampInfo pointer or NULL for error
00293 //--------------------------------------------------
00294   EXP_OPTION TimestampInfo* ddocTimestampInfoList_GetOrCreateTimestampInfoOfType(TimestampInfoList* pTimestampInfoList, const char* szId, const char* szType);
00295 
00296 
00297 
00298 //==========< general functions >============
00299 
00300 //--------------------------------------------------
00301 // Helper function to create a new TS_REQ from XML data objects
00302 // that will be digested. Stores the result in PEM form
00303 // in a DigiDocMemBuf object.
00304 // pMBufReq - memory buffer to store new request in PEM format
00305 // pMBufDigest - digest data to timestamp (xml)
00306 // policy - oilicy oid in stringform. Use NULL if not necessary
00307 // bNonce - 1=send nonce, 0=no nonce
00308 // bCert - request req_cert property 1/0
00309 // returns error code or ERR_OK
00310 //--------------------------------------------------
00311 int ddocTsCreateTsReqBin(DigiDocMemBuf* pMBufReq, DigiDocMemBuf* pMBufDigest, 
00312                          const char* policy, int bNonce, int bCert);
00313 
00314 //--------------------------------------------------
00315 // sends a Timestamp request to TSA server 
00316 // retrieves the TS_RESP object
00317 // pMBufDigest - digest of data to be timestamped [REQUIRED]
00318 // ppResp - address for TS_RESP [REQUIRED]
00319 // policy - policy OID [OPTIONAL]
00320 // bNonce - flag use nonce: 1/0 [REQUIRED]
00321 // bCert - flag send cert: 1/0 [REQUIRED]
00322 // url - TSA url [REQUIRED]
00323 // proxyHost - http proxy host [OPTIONAL]
00324 // proxyPort - http proxy port [OPTIONAL]
00325 // returns error code or ERR_OK
00326 //--------------------------------------------------
00327 EXP_OPTION int ddocSendTSRequest(DigiDocMemBuf* pMBufDigest, TS_RESP** ppResp,
00328                       const char* policy, int bNonce, int bCert, const char* url, 
00329                       const char* proxyHost, const char* proxyPort);
00330 
00331 
00332 //==========< utility functions >========================
00333 
00334 //--------------------------------------------------
00335 // Helper function to read TS_REQ from binary input data
00336 // ppReq - address of newly allocated TS_REQ object
00337 // pMBufInData - input data
00338 // returns error code or ERR_OK
00339 //--------------------------------------------------
00340 int ddocTsReadTsReq(TS_REQ** ppReq, DigiDocMemBuf* pMBufInData);
00341 
00342 //--------------------------------------------------
00343 // Helper function to write TS_REQ to binary output data
00344 // pReq - address of TS_REQ object
00345 // pMBufOutData - output data
00346 // returns error code or ERR_OK
00347 //--------------------------------------------------
00348 int ddocTsWriteTsReq(TS_REQ* pReq, DigiDocMemBuf* pMBufOutData);
00349 
00350 //--------------------------------------------------
00351 // Helper function to read TS_RESP from binary input data
00352 // ppResp - address of newly allocated TS_RESP object
00353 // pMBufInData - input data
00354 // returns error code or ERR_OK
00355 //--------------------------------------------------
00356 EXP_OPTION int ddocTsReadTsResp(TS_RESP** ppResp, DigiDocMemBuf* pMBufInData);
00357 
00358 //--------------------------------------------------
00359 // Helper function to write TS_RESP to binary output data
00360 // pResp - address of TS_RESP object
00361 // pMBufOutData - output data
00362 // returns error code or ERR_OK
00363 //--------------------------------------------------
00364 int ddocTsWriteTsResp(TS_RESP* pResp, DigiDocMemBuf* pMBufOutData);
00365 
00366 //--------------------------------------------------
00367 // Returns TS_RESP policy id.
00368 // pResp - TS_RESP timestamp response [REQUIRED]
00369 // pMBufDigest - buffer for returned data [REQUIRED]
00370 // returns error code or ERR_OK
00371 //--------------------------------------------------
00372 int ddocTSResp_GetPolicyId(TS_RESP* pResp, DigiDocMemBuf* pMBuf);
00373 
00374 //--------------------------------------------------
00375 // Returns TS_RESP status code as string
00376 // pResp - TS_RESP timestamp response [REQUIRED]
00377 // pStatus - address of variable for status [REQUIRED]
00378 // returns error code or ERR_OK
00379 //--------------------------------------------------
00380 int ddocTSResp_GetStatus(TS_RESP* pResp, int* pStatus);
00381 
00382 //--------------------------------------------------
00383 // Returns TS_RESP serial number as a string
00384 // pResp - TS_RESP timestamp response [REQUIRED]
00385 // pMBufDigest - buffer for returned data [REQUIRED]
00386 // returns error code or ERR_OK
00387 //--------------------------------------------------
00388 EXP_OPTION int ddocTSResp_GetSerial(TS_RESP* pResp, DigiDocMemBuf* pMBuf);
00389 
00390 //--------------------------------------------------
00391 // Returns TS_RESP nonce as string
00392 // pResp - TS_RESP timestamp response [REQUIRED]
00393 // pMBufDigest - buffer for returned data [REQUIRED]
00394 // returns error code or ERR_OK
00395 //--------------------------------------------------
00396 int ddocTSResp_GetNonce(TS_RESP* pResp, DigiDocMemBuf* pMBuf);
00397 
00398 //--------------------------------------------------
00399 // Returns TS_RESP time as string
00400 // pResp - TS_RESP timestamp response [REQUIRED]
00401 // pTime - buffer for returned data [REQUIRED]
00402 // returns error code or ERR_OK
00403 //--------------------------------------------------
00404 EXP_OPTION int ddocTSResp_GetTime(TS_RESP* pResp, time_t* pTime);
00405 
00406 //--------------------------------------------------
00407 // Returns TS_RESP tsa name as string
00408 // pResp - TS_RESP timestamp response [REQUIRED]
00409 // pMBufDigest - buffer for returned data [REQUIRED]
00410 // returns error code or ERR_OK
00411 //--------------------------------------------------
00412 EXP_OPTION int ddocTSResp_GetTsaName(TS_RESP* pResp, DigiDocMemBuf* pMBuf);
00413 
00414 //--------------------------------------------------
00415 // Returns TS_RESP message imprint as binary data
00416 // pResp - TS_RESP timestamp response [REQUIRED]
00417 // pMBuf - buffer for returned data [REQUIRED]
00418 // returns error code or ERR_OK
00419 //--------------------------------------------------
00420 EXP_OPTION int ddocTSResp_GetMsgImprint(TS_RESP* pResp, DigiDocMemBuf* pMBuf);
00421 
00422 //--------------------------------------------------
00423 // Returns TS_RESP message imprint algoritm as string
00424 // pResp - TS_RESP timestamp response [REQUIRED]
00425 // pMBuf - buffer for returned data [REQUIRED]
00426 // returns error code or ERR_OK
00427 //--------------------------------------------------
00428 EXP_OPTION int ddocTSResp_GetMsgImprint_Algoritm(TS_RESP* pResp, DigiDocMemBuf* pMBuf);
00429 
00430 //--------------------------------------------------
00431 // Verifies a Timestamp response to TSA.
00432 // pResp - TS_RESP timestamp response [REQUIRED]
00433 // pMBufDigest - digest of timestamped data [REQUIRED]
00434 // pCACerts - CA certs array [REQUIRED]
00435 // szCAPath - path to dir with CA certs [OPTIONAL]
00436 // returns error code or ERR_OK
00437 //--------------------------------------------------
00438 int ddocVerifyTSResponse(TS_RESP* pResp, const DigiDocMemBuf* pMBufDigest, 
00439                          X509** pCACerts, char* szCAPath);
00440 
00441 //--------------------------------------------------
00442 // Returns TS_RESP signers (e.g. TSA) cert serial.
00443 // Assumes that there's only 1 signer
00444 // pResp - TS_RESP timestamp response [REQUIRED]
00445 // pMBuf - buffer for returned data [REQUIRED]
00446 // returns error code or ERR_OK
00447 //--------------------------------------------------
00448 EXP_OPTION int ddocTsResp_GetSignerCertSerial(TS_RESP* pResp, DigiDocMemBuf* pMBuf);
00449 
00450 //--------------------------------------------------
00451 // Returns TS_RESP signers (e.g. TSA) cert issuer DN.
00452 // Assumes that there's only 1 signer
00453 // pResp - TS_RESP timestamp response [REQUIRED]
00454 // pMBuf - buffer for returned data [REQUIRED]
00455 // returns error code or ERR_OK
00456 //--------------------------------------------------
00457 int ddocTsResp_GetSignerCertIssuer(TS_RESP* pResp, DigiDocMemBuf* pMBuf);
00458 
00459 //--------------------------------------------------
00460 // Returns TS_RESP signers (e.g. TSA) cert.
00461 // Assumes that there's only 1 signer
00462 // pResp - TS_RESP timestamp response [REQUIRED]
00463 // ppCert - address of signers cert pointer [REQUIRED]
00464 // returns error code or ERR_OK
00465 //--------------------------------------------------
00466 EXP_OPTION int ddocTsResp_GetSignerCert(TS_RESP* pResp, X509** ppCert);
00467 
00468 //--------------------------------------------------
00469 // Verifies a TimestampInfo
00470 // pTS - TimestampInfo object [REQUIRED]
00471 // pCACerts - CA certs array [REQUIRED]
00472 // szCAPath - path to dir with CA certs [OPTIONAL]
00473 // pTime - address of time_t to store timestamping time [OPTIONAL]
00474 // ppTsaCert - address of TSA cert to return it[OPTIONAL]
00475 // returns error code or ERR_OK
00476 //--------------------------------------------------
00477 int ddocVerifyTimestampInfo(TimestampInfo *pTS, 
00478                             X509** pCACerts, char* szCAPath, 
00479                                 time_t *pTime, X509** ppTsaCert);
00480 
00481 int ddocTsResp_GetSignerCert(TS_RESP* pResp, X509** ppCert);
00482 
00483 #ifdef  __cplusplus
00484 }
00485 #endif
00486 
00487 
00488 #endif // __DIGIDOC_TS_H__
00489 
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'