TP_CertCreateTemplate(3)TP_CertCreateTemplate(3)NAME
TP_CertCreateTemplate, CSSM_TP_CertCreateTemplate - Allocate and ini‐
tialize template memory (CDSA)
SYNOPSIS
# include <cdsa/cssm.h>
API: CSSM_RETURN CSSMAPI CSSM_TP_CertCreateTemplate (CSSM_TP_HANDLE
TPHandle, CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const
CSSM_FIELD *CertFields, CSSM_DATA_PTR CertTemplate) SPI: CSSM_RETURN
CSSMTPI TP_CertCreateTemplate (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE
CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CertFields,
CSSM_DATA_PTR CertTemplate)
LIBRARY
Common Security Services Manager library (libcssm.so)
PARAMETERS
The handle that describes the add-in trust policy module used to per‐
form this function. The handle that describes the certificate library
module used to perform this function. The number of certificate field
values specified in the CertFields. A pointer to an array of OID/value
pairs that identifies the field values to initialize a new certificate.
A pointer to a CSSM_DATA structure that will contain the unsigned cer‐
tificate template as a result of this function.
DESCRIPTION
This function allocates and initializes memory for an encoded certifi‐
cate template output in CertTemplate->Data. The template values are
specified by the input OID/value pairs contained in CertFields. The
initialization process includes encoding all certificate field values
according to the certificate type and certificate template encoding
supported by the trust policy library module. The CertTemplate output
is an unsigned certificate template in the format supported by the TP.
The memory for CertTemplate->Data is allocated by the service provider
using the calling application's memory management routines. The appli‐
cation must deallocate the memory.
RETURN VALUE
A CSSM_RETURN value indicating success or specifying a particular error
condition. The value CSSM_OK indicates success. All other values repre‐
sent an error condition.
ERRORS
Errors are described in the CDSA technical standard. See
CDSA_intro(3). CSSMERR_TP_INVALID_CL_HANDLE CSS‐
MERR_TP_INVALID_FIELD_POINTER CSSMERR_TP_UNKNOWN_TAG CSS‐
MERR_TP_INVALID_NUMBER_OF_FIELDS
SEE ALSO
Books
Intel CDSA Application Developer's Guide (see CDSA_intro(3))
Reference Pages
Functions for the CSSM API:
CSSM_TP_CertGetAllTemplateFields(3), CSSM_TP_CertSign(3)
Functions for the TP SPI:
TP_CertGetAllTemplateFields(3), TP_CertSign(3)TP_CertCreateTemplate(3)