Vtk_ValidationAddCertChain
Toolkit Reference

prevnext

Vtk_ValidationAddCertChain

#include <vtk_valid.h>
#include <vtk_err.h>
Vtk_uint32 Vtk_ValidationAddCertChain(
const Vtk_Ctxt *ctxt, /* input */
Vtk_Validation *val, /* input/output */
const Vtk_Cert *cert, /* input */
VTK_CHAINBUILD_CALLBACK callback, /* input */
void *userHdl /* input */
);

Description

This validation function builds a certificate chain for the specified certificate and adds all the certificates to the validation structure. The CA certificates stored in the Vtk_Ctxt are used while constructing the chain. When an application calls the Vtk_ValidationAddCertChain function, the application can use the Vtk_ChainBuildCallback function to provide a function pointer that will be called every time the Toolkit discovers a new link in the certificate chain.

Parameters

ctxt Pointer to Toolkit context created using the Vtk_CtxtNew function and for which memory has been allocated.
val Validation query structure that contains certificates to be validated.
cert Certificate for which the application wants to build a chain.
callback Function pointer to the chain building callback function. Use NULL when the callback function is not needed.
userHdl Application specific data pointer. The Toolkit calls this parameter. The Toolkit treats this pointer as opaque data. It will be passed to user specified callback function.

Return Value
VTK_OK The function has completed successfully and the certificate has been added to the validation query.
error code The function has failed. For information about possible error values, refer to Appendix 

Notes

The application can use the Vtk_ValidationGetValHdl function to create a validation handle after the certificate is added. The application can then use the validation handle to identify a specific certificate in the certificate chain.


See Also

Vtk_ChainBuildCallBack

Vtk_ValidationGetValHdl

prevnext


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