![]() |
SignDoc SDK (C)
5.0.0
|
Interface for creating an RFC 3161 timestamp. More...
#include <SignDocSDK-c.h>
Public Member Functions | |
const char * | SIGNDOC_TimeStamper_getHashAlgorithmOID (const struct SIGNDOC_TimeStamper *aObj) |
Get the object ID of the message digest algorithm. More... | |
const char * | SIGNDOC_TimeStamper_getFallbackHashAlgorithmOID (const struct SIGNDOC_TimeStamper *aObj) |
Get the object ID of the fallback message digest algorithm. More... | |
int | SIGNDOC_TimeStamper_stamp (struct SIGNDOC_Exception **aEx, struct SIGNDOC_TimeStamper *aObj, const unsigned char *aHashPtr, size_t aHashSize, unsigned aRandomNonceSize, int aFlags, struct SIGNDOC_ByteArray *aOutput, int *aStatus, unsigned *aFailureInfo) |
Create a time-stamp request, send the request to the configured time stamping authority, and evaluate the response. More... | |
void | SIGNDOC_TimeStamper_stop (struct SIGNDOC_TimeStamper *aObj) |
Interrupt a SIGNDOC_TimeStamper_stamp() call from another thread. More... | |
const char * | SIGNDOC_TimeStamper_getErrorMessage (const struct SIGNDOC_TimeStamper *aObj) |
Get an error message for the last SIGNDOC_TimeStamper_stamp() call. More... | |
Interface for creating an RFC 3161 timestamp.
const char * SIGNDOC_TimeStamper_getErrorMessage | ( | const struct SIGNDOC_TimeStamper * | aObj | ) |
Get an error message for the last SIGNDOC_TimeStamper_stamp() call.
[in] | aObj | A pointer to the SIGNDOC_TimeStamper object. |
const char * SIGNDOC_TimeStamper_getFallbackHashAlgorithmOID | ( | const struct SIGNDOC_TimeStamper * | aObj | ) |
Get the object ID of the fallback message digest algorithm.
[in] | aObj | A pointer to the SIGNDOC_TimeStamper object. |
const char * SIGNDOC_TimeStamper_getHashAlgorithmOID | ( | const struct SIGNDOC_TimeStamper * | aObj | ) |
Get the object ID of the message digest algorithm.
[in] | aObj | A pointer to the SIGNDOC_TimeStamper object. |
int SIGNDOC_TimeStamper_stamp | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_TimeStamper * | aObj, | ||
const unsigned char * | aHashPtr, | ||
size_t | aHashSize, | ||
unsigned | aRandomNonceSize, | ||
int | aFlags, | ||
struct SIGNDOC_ByteArray * | aOutput, | ||
int * | aStatus, | ||
unsigned * | aFailureInfo | ||
) |
Create a time-stamp request, send the request to the configured time stamping authority, and evaluate the response.
The signature in the returned time-stamp token is not verified by this function.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_TimeStamper object. |
[in] | aHashPtr | A pointer to the first octet of the document message digest to be hashed (unless SIGNDOC_TIMESTAMPER_STAMPFLAGS_DONT_HASH is set in aFlags) and signed. |
[in] | aHashSize | The size (in octets) of the document message digest pointed to by aHashPtr). |
[in] | aRandomNonceSize | The size (in octets, 1 through 256) of the random nonce in the time-stamp request. |
[in] | aFlags | Flags modifying the behavior of this function, see SIGNDOC_TIMESTAMPER_STAMPFLAGS_DONT_CHECK_REVOCATION and SIGNDOC_TIMESTAMPER_STAMPFLAGS_DONT_HASH. |
[in,out] | aOutput | The time-stamp token sent by the server will be stored here as blob if this function returns SIGNDOC_TIMESTAMPER_STAMPRESULT_OK. Otherwise, aOutput will be empty. |
[out] | aStatus | The PKIStatus value of the response from the server will be stored here. 0 if no response from the server is available. |
[out] | aFailureInfo | The PKIFailureInfo value of the response from the server will be stored here. 0 if no response from the server is available. |
void SIGNDOC_TimeStamper_stop | ( | struct SIGNDOC_TimeStamper * | aObj | ) |
Interrupt a SIGNDOC_TimeStamper_stamp() call from another thread.
If this function is called while SIGNDOC_TimeStamper_stamp() is waiting for the response from the server, SIGNDOC_TimeStamper_stamp() will return SIGNDOC_TIMESTAMPER_STAMPRESULT_STOPPED.
[in] | aObj | A pointer to the SIGNDOC_TimeStamper object. |