SignDoc SDK (C)  5.0.0
SIGNDOC_VerificationParameters Class Reference

Parameters for verifying a certificate chain. More...

#include <SignDocSDK-c.h>

Public Member Functions

struct SIGNDOC_VerificationParametersSIGNDOC_VerificationParameters_new (struct SIGNDOC_Exception **aEx)
 SIGNDOC_VerificationParameters constructor. More...
 
struct SIGNDOC_VerificationParametersSIGNDOC_VerificationParameters_clone (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_VerificationParameters *aSource)
 Clone a SIGNDOC_VerificationParameters object. More...
 
void SIGNDOC_VerificationParameters_delete (struct SIGNDOC_VerificationParameters *aObj)
 SIGNDOC_VerificationParameters destructor. More...
 
void SIGNDOC_VerificationParameters_assign (struct SIGNDOC_Exception **aEx, struct SIGNDOC_VerificationParameters *aObj, const struct SIGNDOC_VerificationParameters *aSource)
 SIGNDOC_VerificationParameters assignment operator. More...
 
void SIGNDOC_VerificationParameters_setForUpdateDSS (struct SIGNDOC_Exception **aEx, struct SIGNDOC_VerificationParameters *aObj)
 Set suitable SIGNDOC_VerificationParameters values for SIGNDOC_Document_updateDSS() and SIGNDOC_Document_updateDSS2(). More...
 
int SIGNDOC_VerificationParameters_setString (struct SIGNDOC_Exception **aEx, struct SIGNDOC_VerificationParameters *aObj, int aEncoding, const char *aName, const char *aValue)
 Set a string parameter. More...
 
int SIGNDOC_VerificationParameters_setStringW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_VerificationParameters *aObj, const char *aName, const wchar_t *aValue)
 Set a string parameter. More...
 
int SIGNDOC_VerificationParameters_setInteger (struct SIGNDOC_Exception **aEx, struct SIGNDOC_VerificationParameters *aObj, const char *aName, int aValue)
 Set an integer parameter. More...
 
int SIGNDOC_VerificationParameters_setBlob (struct SIGNDOC_Exception **aEx, struct SIGNDOC_VerificationParameters *aObj, const char *aName, const unsigned char *aData, size_t aSize)
 Set a blob parameter. More...
 
const char * SIGNDOC_VerificationParameters_getErrorMessage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_VerificationParameters *aObj, int aEncoding)
 Get an error message for the last function call. More...
 
const wchar_t * SIGNDOC_VerificationParameters_getErrorMessageW (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_VerificationParameters *aObj)
 Get an error message for the last function call. More...
 
SIGNDOC_Boolean SIGNDOC_VerificationParameters_equals (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_VerificationParameters *aObj, const struct SIGNDOC_VerificationParameters *aOther)
 Compare against another SIGNDOC_VerificationParameters object. More...
 

Detailed Description

Parameters for verifying a certificate chain.

Use SIGNDOC_VerificationParameters_getErrorMessage() or SIGNDOC_VerificationParameters_getErrorMessageW() to get more information after a function call failed.

If you use a NULL pointer instead of a pointer to a SIGNDOC_VerificationParameters object, the following default values will be used (those are identical to the default values for a freshly created SIGNDOC_VerificationParameters object):

However, for SIGNDOC_Document_updateDSS() and SIGNDOC_Document_updateDSS2(), the following default values will be used if a NULL pointer is passed (those are identical to the values set by SIGNDOC_VerificationParameters_setForUpdateDSS()):

To make the signature maximally meaningful, verification parameters for SIGNDOC_Document_addSignature() should include SIGNDOC_VERIFICATIONPARAMETERS_VERIFICATIONFLAGS_CHECK_REVOCATION in integer parameter "VerificationFlags".

If integer parameter "CertificateChainVerificationPolicy" is SIGNDOC_VERIFICATIONPARAMETERS_CERTIFICATECHAINVERIFICATIONPOLICY_DONT_VERIFY, integer parameter "CertificateRevocationVerificationPolicy" must be SIGNDOC_VERIFICATIONPARAMETERS_CERTIFICATEREVOCATIONVERIFICATIONPOLICY_DONT_CHECK.

See also
SIGNDOC_Document_renderPageAsImage(), SIGNDOC_Document_renderPageAsSignDocImage(), SIGNDOC_VerificationParameters_setForUpdateDSS(), SIGNDOC_Document_updateDSS(), SIGNDOC_Document_updateDSS2(), SIGNDOC_VerificationResult_verifyCertificateChain(), SIGNDOC_VerificationResult_verifyCertificateSimplified(), SIGNDOC_VerificationResult_verifyTimeStampCertificateChain(), SIGNDOC_VerificationResult_verifyTimeStampCertificateSimplified()

Member Function Documentation

void SIGNDOC_VerificationParameters_assign ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_VerificationParameters aObj,
const struct SIGNDOC_VerificationParameters aSource 
)

SIGNDOC_VerificationParameters assignment operator.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_VerificationParameters object.
[in]aSourceThe source object.
struct SIGNDOC_VerificationParameters * SIGNDOC_VerificationParameters_clone ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_VerificationParameters aSource 
)

Clone a SIGNDOC_VerificationParameters object.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aSourceThe object to be copied.
void SIGNDOC_VerificationParameters_delete ( struct SIGNDOC_VerificationParameters aObj)

SIGNDOC_VerificationParameters destructor.

Parameters
[in]aObjA pointer to the SIGNDOC_VerificationParameters object.
SIGNDOC_Boolean SIGNDOC_VerificationParameters_equals ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_VerificationParameters aObj,
const struct SIGNDOC_VerificationParameters aOther 
)

Compare against another SIGNDOC_VerificationParameters object.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_VerificationParameters object.
[in]aOtherThe object to compare against.
Returns
SIGNDOC_TRUE iff aObj compares equal to aOther.
const char * SIGNDOC_VerificationParameters_getErrorMessage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_VerificationParameters aObj,
int  aEncoding 
)

Get an error message for the last function call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_VerificationParameters object.
[in]aEncodingThe encoding to be used for the error message (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_VerificationParameters_getErrorMessageW()
const wchar_t * SIGNDOC_VerificationParameters_getErrorMessageW ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_VerificationParameters aObj 
)

Get an error message for the last function call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_VerificationParameters object.
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_VerificationParameters_getErrorMessage()
struct SIGNDOC_VerificationParameters * SIGNDOC_VerificationParameters_new ( struct SIGNDOC_Exception **  aEx)

SIGNDOC_VerificationParameters constructor.

See struct SIGNDOC_VerificationParameters for the default values.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
See also
SIGNDOC_VerificationParameters_setForUpdateDSS()
int SIGNDOC_VerificationParameters_setBlob ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_VerificationParameters aObj,
const char *  aName,
const unsigned char *  aData,
size_t  aSize 
)

Set a blob parameter.

Available blob parameters are:

  • IntermediateCertificate Add an intermediate certificate which might help building the certificate chain. The blob must contain a serialized X.509 certificate (DER or PEM).
  • TrustedCertificate Add a trusted root certificate. The blob must contain a serialized X.509 certificate (DER or PEM).
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_VerificationParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aDataA pointer to the first octet of the value.
[in]aSizeSize of the blob (number of octets).
Returns
SIGNDOC_RETURNCODE_OK iff successful.
void SIGNDOC_VerificationParameters_setForUpdateDSS ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_VerificationParameters aObj 
)

Set suitable SIGNDOC_VerificationParameters values for SIGNDOC_Document_updateDSS() and SIGNDOC_Document_updateDSS2().

See struct SIGNDOC_VerificationParameters for the values set by this function.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_VerificationParameters object.
int SIGNDOC_VerificationParameters_setInteger ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_VerificationParameters aObj,
const char *  aName,
int  aValue 
)

Set an integer parameter.

Available integer parameters are:

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_VerificationParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_VerificationParameters_setString ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_VerificationParameters aObj,
int  aEncoding,
const char *  aName,
const char *  aValue 
)

Set a string parameter.

Available string parameters are:

  • UserAgent The value of the User-Agent header field sent to CRL and OCSP servers. The default value is "SignDoc".
  • VerificationTime Empty (for the current date and time) or a string in ISO 8601 format ("yyyy-mm-ddThh:mm:ss", with optional timezone) specifying the verification date and time. The default value is empty. Used only if integer parameter "VerificationModel" is SIGNDOC_VERIFICATIONPARAMETERS_VERIFICATIONMODEL_SHELL. This parameteter is not used by SIGNDOC_Document_addSignature(); that function always use the signing time as verification time.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_VerificationParameters object.
[in]aEncodingThe encoding used for aValue (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter. The encoding is specified by aEncoding.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_VerificationParameters_setStringW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_VerificationParameters aObj,
const char *  aName,
const wchar_t *  aValue 
)

Set a string parameter.

See SIGNDOC_VerificationParameters_setString() for a list of available string parameters.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_VerificationParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK iff successful.

The documentation for this class was generated from the following file: