Vtk_Buffer
Toolkit Reference

prevnext

Vtk_Buffer

typedef struct {
enum Vtk_DataFormat type;
Vtk_Byte* dPtr;
Vtk_uint32 len;
} Vtk_Buffer;

Description

This is a general purpose structure used to pass data between the Toolkit or VA and your application. It defines information such as the encoding method employed and the length of the buffer. The most common use of this buffer is to pass certificate data, which is typically 1K in length.

It is used in the Vtk_ValidationAddCertRaw, Vtk_CertInit, Vtk_ExtensionsGetByOid, Vtk_CtxtSetOption, and Vtk_CtxtGetOption functions. It is also used in the Vtk_ValQuery structure for request and response information.

Parameters

type Type of encoding applied to the data contained in the buffer. The possible values are:
  • VTK_DF_STRING--null-terminated printable string

  • VTK_DF_DER--DER encoding

  • VTK_DF_BASE64--Base64 encoding

  • VTK_DF_HEX--Hexadecimal encoding

For more information about these encoding types, see Vtk_DataFormat.
dPtr Pointer to the location of the buffer.
len Length of the buffer.


Notes

The Toolkit provides the VTK_BUF_INIT macro for initializing the Vtk_Buffer and VTK_EMPTY_BUF for checking whether it is empty.
When the buffer is initialized, Vtk_Buffer contains the following values:
Vtk_DataFormat = VTK_DF_STRING
dPtr = NULL
len = 0 When checking if the buffer is empty, the following is checked:

dPtr == NULL
len < 0


See Also

Vtk_DataFormat

Vtk_ValQuery

prevnext


ValiCert, Inc.
http://www.valicert.com
Voice: +1.650.567.5469
Fax: (+1.650.254.2148
support@valicert.com