Pdftools SDK
Loading...
Searching...
No Matches
Macros | Functions
PdfTools_PdfToolsCryptoProvidersBuiltIn.h File Reference
#include "PdfTools_Types.h"
#include "PdfTools_PdfToolsSys.h"

Go to the source code of this file.

Macros

#define PDFTOOLS_CALL
 
#define PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificate    PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificateA
 
#define PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignature    PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignatureA
 
#define PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrl   PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrlA
 
#define PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrl   PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrlA
 

Functions

PDFTOOLS_EXPORT TPdfToolsCrypto_HashAlgorithm PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetHashAlgorithm (TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *pSignatureConfiguration)
 The message digest algorithm.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetHashAlgorithm (TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *pSignatureConfiguration, TPdfToolsCrypto_HashAlgorithm iHashAlgorithm)
 The message digest algorithm.
 
PDFTOOLS_EXPORT TPdfToolsCrypto_SignaturePaddingType PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetSignaturePaddingType (TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *pSignatureConfiguration)
 The padding type of the cryptographic signature Default: ePdfToolsCrypto_SignaturePaddingType_RsaSsaPss for RSA and for ePdfToolsCrypto_SignaturePaddingType_Default ECDSA certificates.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetSignaturePaddingType (TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *pSignatureConfiguration, TPdfToolsCrypto_SignaturePaddingType iSignaturePaddingType)
 The padding type of the cryptographic signature Default: ePdfToolsCrypto_SignaturePaddingType_RsaSsaPss for RSA and for ePdfToolsCrypto_SignaturePaddingType_Default ECDSA certificates.
 
PDFTOOLS_EXPORT TPdfToolsCrypto_SignatureFormat PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetSignatureFormat (TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *pSignatureConfiguration)
 The format (encoding) of the cryptographic signature Default: ePdfToolsCrypto_SignatureFormat_EtsiCadesDetached.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetSignatureFormat (TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *pSignatureConfiguration, TPdfToolsCrypto_SignatureFormat iSignatureFormat)
 The format (encoding) of the cryptographic signature Default: ePdfToolsCrypto_SignatureFormat_EtsiCadesDetached.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetAddTimestamp (TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *pSignatureConfiguration)
 Whether to add a trusted time-stamp to the signature.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetAddTimestamp (TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *pSignatureConfiguration, BOOL bAddTimestamp)
 Whether to add a trusted time-stamp to the signature.
 
PDFTOOLS_EXPORT TPdfToolsCrypto_ValidationInformation PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetValidationInformation (TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *pSignatureConfiguration)
 Whether to add validation information (LTV)
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetValidationInformation (TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *pSignatureConfiguration, TPdfToolsCrypto_ValidationInformation iValidationInformation)
 Whether to add validation information (LTV)
 
PDFTOOLS_EXPORT TPdfToolsCrypto_HashAlgorithm PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_TimestampConfiguration_GetHashAlgorithm (TPdfToolsCryptoProvidersBuiltIn_TimestampConfiguration *pTimestampConfiguration)
 The message digest algorithm.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_TimestampConfiguration_SetHashAlgorithm (TPdfToolsCryptoProvidersBuiltIn_TimestampConfiguration *pTimestampConfiguration, TPdfToolsCrypto_HashAlgorithm iHashAlgorithm)
 The message digest algorithm.
 
PDFTOOLS_EXPORT TPdfToolsCryptoProvidersBuiltIn_Provider *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_New (void)
 
PDFTOOLS_EXPORT TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificateA (TPdfToolsCryptoProvidersBuiltIn_Provider *pProvider, const TPdfToolsSys_StreamDescriptor *pStreamDesc, const char *szPassword)
 Create a configuration to sign with a PFX (PKCS#12) soft certificate The file must contain the certificate itself, all certificates of the trust chain, and the private key.
 
PDFTOOLS_EXPORT TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificateW (TPdfToolsCryptoProvidersBuiltIn_Provider *pProvider, const TPdfToolsSys_StreamDescriptor *pStreamDesc, const WCHAR *szPassword)
 Create a configuration to sign with a PFX (PKCS#12) soft certificate The file must contain the certificate itself, all certificates of the trust chain, and the private key.
 
PDFTOOLS_EXPORT TPdfToolsCryptoProvidersBuiltIn_TimestampConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_CreateTimestamp (TPdfToolsCryptoProvidersBuiltIn_Provider *pProvider)
 Create a time-stamp configuration Note that to create time-stamps, the PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrl must be set.
 
PDFTOOLS_EXPORT TPdfToolsSign_SignatureConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignatureA (TPdfToolsCryptoProvidersBuiltIn_Provider *pProvider, int iSize, const char *szFormat, const char *szName)
 Create a configuration to prepare a signature for an external signature handler This method is part of a very specialized use case requiring an external signature handler. The process using an external signature handler is:
 
PDFTOOLS_EXPORT TPdfToolsSign_SignatureConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignatureW (TPdfToolsCryptoProvidersBuiltIn_Provider *pProvider, int iSize, const WCHAR *szFormat, const WCHAR *szName)
 Create a configuration to prepare a signature for an external signature handler This method is part of a very specialized use case requiring an external signature handler. The process using an external signature handler is:
 
PDFTOOLS_EXPORT TPdfToolsSign_SignatureConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_ReadExternalSignature (TPdfToolsCryptoProvidersBuiltIn_Provider *pProvider, const unsigned char *pSignature, size_t nSignatures)
 Read signature created by an external signature handler See PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignature for more information on the signing process using an external signature handler.
 
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrlA (TPdfToolsCryptoProvidersBuiltIn_Provider *pProvider, char *pBuffer, size_t nBufferSize)
 The URL of the trusted time-stamp authority (TSA) from which time-stamps shall be acquired.
 
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrlW (TPdfToolsCryptoProvidersBuiltIn_Provider *pProvider, WCHAR *pBuffer, size_t nBufferSize)
 The URL of the trusted time-stamp authority (TSA) from which time-stamps shall be acquired.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrlA (TPdfToolsCryptoProvidersBuiltIn_Provider *pProvider, const char *szTimestampUrl)
 The URL of the trusted time-stamp authority (TSA) from which time-stamps shall be acquired.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrlW (TPdfToolsCryptoProvidersBuiltIn_Provider *pProvider, const WCHAR *szTimestampUrl)
 The URL of the trusted time-stamp authority (TSA) from which time-stamps shall be acquired.
 

Macro Definition Documentation

◆ PDFTOOLS_CALL

#define PDFTOOLS_CALL

◆ PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignature

#define PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignature    PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignatureA

◆ PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificate

#define PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificate    PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificateA

◆ PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrl

#define PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrl   PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrlA

◆ PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrl

#define PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrl   PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrlA

Function Documentation

◆ PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignatureA()

PDFTOOLS_EXPORT TPdfToolsSign_SignatureConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignatureA ( TPdfToolsCryptoProvidersBuiltIn_Provider * pProvider,
int iSize,
const char * szFormat,
const char * szName )

Create a configuration to prepare a signature for an external signature handler This method is part of a very specialized use case requiring an external signature handler. The process using an external signature handler is:

Parameters
[in,out]pProviderActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_Provider.
[in]iSizeThe expected size of the cryptographic signature that will be added later. This is the number of bytes that will be reserved in the prepared signature.
[in]szFormatThe format (SubFilter) of the cryptographic signature that is added later. For example, "adbe.pkcs7.detached" or "ETSI.CAdES.detached".
[in]szNameThe name of the signer of the cryptographic signature that will be added later.
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignatureW()

PDFTOOLS_EXPORT TPdfToolsSign_SignatureConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignatureW ( TPdfToolsCryptoProvidersBuiltIn_Provider * pProvider,
int iSize,
const WCHAR * szFormat,
const WCHAR * szName )

Create a configuration to prepare a signature for an external signature handler This method is part of a very specialized use case requiring an external signature handler. The process using an external signature handler is:

Parameters
[in,out]pProviderActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_Provider.
[in]iSizeThe expected size of the cryptographic signature that will be added later. This is the number of bytes that will be reserved in the prepared signature.
[in]szFormatThe format (SubFilter) of the cryptographic signature that is added later. For example, "adbe.pkcs7.detached" or "ETSI.CAdES.detached".
[in]szNameThe name of the signer of the cryptographic signature that will be added later.
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificateA()

PDFTOOLS_EXPORT TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificateA ( TPdfToolsCryptoProvidersBuiltIn_Provider * pProvider,
const TPdfToolsSys_StreamDescriptor * pStreamDesc,
const char * szPassword )

Create a configuration to sign with a PFX (PKCS#12) soft certificate The file must contain the certificate itself, all certificates of the trust chain, and the private key.

Parameters
[in,out]pProviderActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_Provider.
[in]pStreamDescThe signing certificate in PKCS#12 format (.p12, .pfx).
[in]szPasswordThe password required to decrypt the private key of the archive.
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificateW()

PDFTOOLS_EXPORT TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_CreateSignatureFromCertificateW ( TPdfToolsCryptoProvidersBuiltIn_Provider * pProvider,
const TPdfToolsSys_StreamDescriptor * pStreamDesc,
const WCHAR * szPassword )

Create a configuration to sign with a PFX (PKCS#12) soft certificate The file must contain the certificate itself, all certificates of the trust chain, and the private key.

Parameters
[in,out]pProviderActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_Provider.
[in]pStreamDescThe signing certificate in PKCS#12 format (.p12, .pfx).
[in]szPasswordThe password required to decrypt the private key of the archive.
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsCryptoProvidersBuiltIn_Provider_CreateTimestamp()

Create a time-stamp configuration Note that to create time-stamps, the PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrl must be set.

Parameters
[in,out]pProviderActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_Provider.
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrlA()

PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrlA ( TPdfToolsCryptoProvidersBuiltIn_Provider * pProvider,
char * pBuffer,
size_t nBufferSize )

The URL of the trusted time-stamp authority (TSA) from which time-stamps shall be acquired.

The TSA must support the time-stamp protocol as defined in RFC 3161.

The property’s value must be a URL with the following elements:

http[s]://[‹user›[:‹password›]@]‹host›[:‹port›][/‹resource›]

Where:

  • http/https: Protocol for connection to TSA.
  • ‹user›:‹password› (optional): Credentials for connection to TSA (basic authorization).
  • ‹host›: Hostname of TSA.
  • ‹port›: Port for connection to TSA.
  • ‹resource›: The resource.

Applying a time-stamp requires an online connection to a time server; the firewall must be configured accordingly. If a web proxy is used (see PdfTools_Sdk_GetProxy), make sure the following MIME types are supported:

  • application/timestamp-query
  • application/timestamp-reply
Parameters
[in,out]pProviderActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_Provider.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when 0 was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrlW()

PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrlW ( TPdfToolsCryptoProvidersBuiltIn_Provider * pProvider,
WCHAR * pBuffer,
size_t nBufferSize )

The URL of the trusted time-stamp authority (TSA) from which time-stamps shall be acquired.

The TSA must support the time-stamp protocol as defined in RFC 3161.

The property’s value must be a URL with the following elements:

http[s]://[‹user›[:‹password›]@]‹host›[:‹port›][/‹resource›]

Where:

  • http/https: Protocol for connection to TSA.
  • ‹user›:‹password› (optional): Credentials for connection to TSA (basic authorization).
  • ‹host›: Hostname of TSA.
  • ‹port›: Port for connection to TSA.
  • ‹resource›: The resource.

Applying a time-stamp requires an online connection to a time server; the firewall must be configured accordingly. If a web proxy is used (see PdfTools_Sdk_GetProxy), make sure the following MIME types are supported:

  • application/timestamp-query
  • application/timestamp-reply
Parameters
[in,out]pProviderActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_Provider.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when 0 was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_Provider_New()

PDFTOOLS_EXPORT TPdfToolsCryptoProvidersBuiltIn_Provider *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_New ( void )
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_Provider_ReadExternalSignature()

PDFTOOLS_EXPORT TPdfToolsSign_SignatureConfiguration *PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_ReadExternalSignature ( TPdfToolsCryptoProvidersBuiltIn_Provider * pProvider,
const unsigned char * pSignature,
size_t nSignatures )

Read signature created by an external signature handler See PdfToolsCryptoProvidersBuiltIn_Provider_CreatePreparedSignature for more information on the signing process using an external signature handler.

Parameters
[in,out]pProviderActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_Provider.
[in]pSignatureThis signature must not be larger than the number of bytes reserved in the prepared signature.
[in]nSignaturesSize of the array pSignature.
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrlA()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrlA ( TPdfToolsCryptoProvidersBuiltIn_Provider * pProvider,
const char * szTimestampUrl )

The URL of the trusted time-stamp authority (TSA) from which time-stamps shall be acquired.

The TSA must support the time-stamp protocol as defined in RFC 3161.

The property’s value must be a URL with the following elements:

http[s]://[‹user›[:‹password›]@]‹host›[:‹port›][/‹resource›]

Where:

  • http/https: Protocol for connection to TSA.
  • ‹user›:‹password› (optional): Credentials for connection to TSA (basic authorization).
  • ‹host›: Hostname of TSA.
  • ‹port›: Port for connection to TSA.
  • ‹resource›: The resource.

Applying a time-stamp requires an online connection to a time server; the firewall must be configured accordingly. If a web proxy is used (see PdfTools_Sdk_GetProxy), make sure the following MIME types are supported:

  • application/timestamp-query
  • application/timestamp-reply
Parameters
[in,out]pProviderActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_Provider.
[in]szTimestampUrlSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrlW()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_Provider_SetTimestampUrlW ( TPdfToolsCryptoProvidersBuiltIn_Provider * pProvider,
const WCHAR * szTimestampUrl )

The URL of the trusted time-stamp authority (TSA) from which time-stamps shall be acquired.

The TSA must support the time-stamp protocol as defined in RFC 3161.

The property’s value must be a URL with the following elements:

http[s]://[‹user›[:‹password›]@]‹host›[:‹port›][/‹resource›]

Where:

  • http/https: Protocol for connection to TSA.
  • ‹user›:‹password› (optional): Credentials for connection to TSA (basic authorization).
  • ‹host›: Hostname of TSA.
  • ‹port›: Port for connection to TSA.
  • ‹resource›: The resource.

Applying a time-stamp requires an online connection to a time server; the firewall must be configured accordingly. If a web proxy is used (see PdfTools_Sdk_GetProxy), make sure the following MIME types are supported:

  • application/timestamp-query
  • application/timestamp-reply
Parameters
[in,out]pProviderActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_Provider.
[in]szTimestampUrlSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetAddTimestamp()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetAddTimestamp ( TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration * pSignatureConfiguration)

Whether to add a trusted time-stamp to the signature.

If TRUE the PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrl must be set.

Default: FALSE

Parameters
[in,out]pSignatureConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetHashAlgorithm()

PDFTOOLS_EXPORT TPdfToolsCrypto_HashAlgorithm PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetHashAlgorithm ( TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration * pSignatureConfiguration)

The message digest algorithm.

The algorithm used to hash the document and from which the cryptographic signature is created.

Default: ePdfToolsCrypto_HashAlgorithm_Sha256

Parameters
[in,out]pSignatureConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetSignatureFormat()

PDFTOOLS_EXPORT TPdfToolsCrypto_SignatureFormat PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetSignatureFormat ( TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration * pSignatureConfiguration)

The format (encoding) of the cryptographic signature Default: ePdfToolsCrypto_SignatureFormat_EtsiCadesDetached.

Parameters
[in,out]pSignatureConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetSignaturePaddingType()

PDFTOOLS_EXPORT TPdfToolsCrypto_SignaturePaddingType PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetSignaturePaddingType ( TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration * pSignatureConfiguration)

The padding type of the cryptographic signature Default: ePdfToolsCrypto_SignaturePaddingType_RsaSsaPss for RSA and for ePdfToolsCrypto_SignaturePaddingType_Default ECDSA certificates.

Parameters
[in,out]pSignatureConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetValidationInformation()

PDFTOOLS_EXPORT TPdfToolsCrypto_ValidationInformation PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_GetValidationInformation ( TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration * pSignatureConfiguration)

Whether to add validation information (LTV)

For signing certificates that do not offer validation (revocation) information (OCSP or CRL), this property is ignored.

If downloading validation information fails, an error ePdfTools_Error_NotFound or ePdfTools_Error_Http is generated. See ePdfToolsSign_WarningCategory_AddValidationInformationFailed for a description of possible error causes and solutions.

Default: ePdfToolsCrypto_ValidationInformation_EmbedInDocument if the signing certificate offers validation information and ePdfToolsCrypto_ValidationInformation_None otherwise

Parameters
[in,out]pSignatureConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetAddTimestamp()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetAddTimestamp ( TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration * pSignatureConfiguration,
BOOL bAddTimestamp )

Whether to add a trusted time-stamp to the signature.

If TRUE the PdfToolsCryptoProvidersBuiltIn_Provider_GetTimestampUrl must be set.

Default: FALSE

Parameters
[in,out]pSignatureConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration.
[in]bAddTimestampSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetHashAlgorithm()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetHashAlgorithm ( TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration * pSignatureConfiguration,
TPdfToolsCrypto_HashAlgorithm iHashAlgorithm )

The message digest algorithm.

The algorithm used to hash the document and from which the cryptographic signature is created.

Default: ePdfToolsCrypto_HashAlgorithm_Sha256

Parameters
[in,out]pSignatureConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration.
[in]iHashAlgorithmSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetSignatureFormat()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetSignatureFormat ( TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration * pSignatureConfiguration,
TPdfToolsCrypto_SignatureFormat iSignatureFormat )

The format (encoding) of the cryptographic signature Default: ePdfToolsCrypto_SignatureFormat_EtsiCadesDetached.

Parameters
[in,out]pSignatureConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration.
[in]iSignatureFormatSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetSignaturePaddingType()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetSignaturePaddingType ( TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration * pSignatureConfiguration,
TPdfToolsCrypto_SignaturePaddingType iSignaturePaddingType )

The padding type of the cryptographic signature Default: ePdfToolsCrypto_SignaturePaddingType_RsaSsaPss for RSA and for ePdfToolsCrypto_SignaturePaddingType_Default ECDSA certificates.

Parameters
[in,out]pSignatureConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration.
[in]iSignaturePaddingTypeSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetValidationInformation()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_SignatureConfiguration_SetValidationInformation ( TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration * pSignatureConfiguration,
TPdfToolsCrypto_ValidationInformation iValidationInformation )

Whether to add validation information (LTV)

For signing certificates that do not offer validation (revocation) information (OCSP or CRL), this property is ignored.

If downloading validation information fails, an error ePdfTools_Error_NotFound or ePdfTools_Error_Http is generated. See ePdfToolsSign_WarningCategory_AddValidationInformationFailed for a description of possible error causes and solutions.

Default: ePdfToolsCrypto_ValidationInformation_EmbedInDocument if the signing certificate offers validation information and ePdfToolsCrypto_ValidationInformation_None otherwise

Parameters
[in,out]pSignatureConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_SignatureConfiguration.
[in]iValidationInformationSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsCryptoProvidersBuiltIn_TimestampConfiguration_GetHashAlgorithm()

PDFTOOLS_EXPORT TPdfToolsCrypto_HashAlgorithm PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_TimestampConfiguration_GetHashAlgorithm ( TPdfToolsCryptoProvidersBuiltIn_TimestampConfiguration * pTimestampConfiguration)

The message digest algorithm.

The algorithm used to hash the document and from which the time-stamp signature is created.

Note: This algorithm must be supported by the time-stamp server; many support only SHA-256.

Default: ePdfToolsCrypto_HashAlgorithm_Sha256

Parameters
[in,out]pTimestampConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_TimestampConfiguration.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsCryptoProvidersBuiltIn_TimestampConfiguration_SetHashAlgorithm()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsCryptoProvidersBuiltIn_TimestampConfiguration_SetHashAlgorithm ( TPdfToolsCryptoProvidersBuiltIn_TimestampConfiguration * pTimestampConfiguration,
TPdfToolsCrypto_HashAlgorithm iHashAlgorithm )

The message digest algorithm.

The algorithm used to hash the document and from which the time-stamp signature is created.

Note: This algorithm must be supported by the time-stamp server; many support only SHA-256.

Default: ePdfToolsCrypto_HashAlgorithm_Sha256

Parameters
[in,out]pTimestampConfigurationActs as a handle to the native object of type TPdfToolsCryptoProvidersBuiltIn_TimestampConfiguration.
[in]iHashAlgorithmSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes: