ifapi_helper.3 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080
  1. .TH "ifapi_helper" 3 "Fri Oct 7 2022" "Version 3.2.0" "tpm2-tss" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. ifapi_helper
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Functions"
  10. .in +1c
  11. .ti -1c
  12. .RI "bool \fBadd_string_to_list\fP (\fBNODE_STR_T\fP *str_list, char *string)"
  13. .br
  14. .ti -1c
  15. .RI "TSS2_RC \fBappend_object_to_list\fP (void *object, \fBNODE_OBJECT_T\fP **object_list)"
  16. .br
  17. .ti -1c
  18. .RI "void \fBfree_string_list\fP (\fBNODE_STR_T\fP *node)"
  19. .br
  20. .ti -1c
  21. .RI "char * \fBget_description\fP (\fBIFAPI_OBJECT\fP *object)"
  22. .br
  23. .ti -1c
  24. .RI "bool \fBifapi_TPM2B_DIGEST_cmp\fP (TPM2B_DIGEST *in1, TPM2B_DIGEST *in2)"
  25. .br
  26. .ti -1c
  27. .RI "bool \fBifapi_TPM2B_ECC_PARAMETER_cmp\fP (TPM2B_ECC_PARAMETER *in1, TPM2B_ECC_PARAMETER *in2)"
  28. .br
  29. .ti -1c
  30. .RI "bool \fBifapi_TPM2B_PUBLIC_KEY_RSA_cmp\fP (TPM2B_PUBLIC_KEY_RSA *in1, TPM2B_PUBLIC_KEY_RSA *in2)"
  31. .br
  32. .ti -1c
  33. .RI "bool \fBifapi_TPMS_ECC_POINT_cmp\fP (TPMS_ECC_POINT *in1, TPMS_ECC_POINT *in2)"
  34. .br
  35. .ti -1c
  36. .RI "bool \fBifapi_TPMT_PUBLIC_cmp\fP (TPMT_PUBLIC *in1, TPMT_PUBLIC *in2)"
  37. .br
  38. .ti -1c
  39. .RI "bool \fBifapi_TPMU_PUBLIC_ID_cmp\fP (TPMU_PUBLIC_ID *in1, UINT32 selector1, TPMU_PUBLIC_ID *in2, UINT32 selector2)"
  40. .br
  41. .ti -1c
  42. .RI "TSS2_RC \fBifapi_asprintf\fP (char **str, const char *fmt,\&.\&.\&.)"
  43. .br
  44. .ti -1c
  45. .RI "TSS2_RC \fBifapi_calculate_pcr_digest\fP (json_object *jso_event_list, const \fBFAPI_QUOTE_INFO\fP *quote_info, TPM2B_DIGEST *pcr_digest)"
  46. .br
  47. .ti -1c
  48. .RI "TSS2_RC \fBifapi_check_profile_pcr_selection\fP (const TPML_PCR_SELECTION *pcr_profile, const TPML_PCR_SELECTION *pcr_capablity)"
  49. .br
  50. .ti -1c
  51. .RI "void \fBifapi_cleanup_policy\fP (\fBTPMS_POLICY\fP *policy)"
  52. .br
  53. .ti -1c
  54. .RI "bool \fBifapi_cmp_public_key\fP (TPM2B_PUBLIC *key1, TPM2B_PUBLIC *key2)"
  55. .br
  56. .ti -1c
  57. .RI "TSS2_RC \fBifapi_compute_policy_digest\fP (\fBTPML_PCRVALUES\fP *pcrs, TPML_PCR_SELECTION *pcr_selection, TPMI_ALG_HASH hash_alg, TPM2B_DIGEST *pcr_digest)"
  58. .br
  59. .ti -1c
  60. .RI "TSS2_RC \fBifapi_compute_quote_info\fP (\fBIFAPI_OBJECT\fP *sig_key_object, TPM2B_ATTEST *tpm_quoted, char **quoteInfo)"
  61. .br
  62. .ti -1c
  63. .RI "\fBTPMS_POLICY\fP * \fBifapi_copy_policy\fP (const \fBTPMS_POLICY\fP *from_policy)"
  64. .br
  65. .ti -1c
  66. .RI "TSS2_RC \fBifapi_create_dirs\fP (const char *supdir, const char *path)"
  67. .br
  68. .ti -1c
  69. .RI "TSS2_RC \fBifapi_extend_vpcr\fP (TPM2B_DIGEST *vpcr, TPMI_ALG_HASH bank, const \fBIFAPI_EVENT\fP *event)"
  70. .br
  71. .ti -1c
  72. .RI "TSS2_RC \fBifapi_filter_pcr_selection_by_index\fP (TPML_PCR_SELECTION *pcr_selection, const TPM2_HANDLE *pcr_index, size_t pcr_count)"
  73. .br
  74. .ti -1c
  75. .RI "void \fBifapi_free_node_list\fP (\fBNODE_OBJECT_T\fP *node)"
  76. .br
  77. .ti -1c
  78. .RI "void \fBifapi_free_object_list\fP (\fBNODE_OBJECT_T\fP *node)"
  79. .br
  80. .ti -1c
  81. .RI "int \fBifapi_get_curl_buffer\fP (unsigned char *url, unsigned char **buffer, size_t *buffer_size)"
  82. .br
  83. .ti -1c
  84. .RI "\fBESYS_TR\fP \fBifapi_get_hierary_handle\fP (const char *path)"
  85. .br
  86. .ti -1c
  87. .RI "TSS2_RC \fBifapi_get_name\fP (TPMT_PUBLIC *publicInfo, TPM2B_NAME *name)"
  88. .br
  89. .ti -1c
  90. .RI "TSS2_RC \fBifapi_get_nv_start_index\fP (const char *path, TPM2_HANDLE *start_nv_index)"
  91. .br
  92. .ti -1c
  93. .RI "TSS2_RC \fBifapi_get_quote_info\fP (char const *quoteInfo, TPM2B_ATTEST *tpm_quoted, \fBFAPI_QUOTE_INFO\fP *fapi_quote_info)"
  94. .br
  95. .ti -1c
  96. .RI "bool \fBifapi_hierarchy_path_p\fP (const char *path)"
  97. .br
  98. .ti -1c
  99. .RI "void \fBifapi_init_hierarchy_object\fP (\fBIFAPI_OBJECT\fP *hierarchy, \fBESYS_TR\fP esys_handle)"
  100. .br
  101. .ti -1c
  102. .RI "TSS2_RC \fBifapi_nv_get_name\fP (TPM2B_NV_PUBLIC *publicInfo, TPM2B_NAME *name)"
  103. .br
  104. .ti -1c
  105. .RI "TSS2_RC \fBifapi_object_cmp_name\fP (\fBIFAPI_OBJECT\fP *object, void *name, bool *equal)"
  106. .br
  107. .ti -1c
  108. .RI "TSS2_RC \fBifapi_object_cmp_nv_public\fP (\fBIFAPI_OBJECT\fP *object, void *nv_public, bool *equal)"
  109. .br
  110. .ti -1c
  111. .RI "size_t \fBifapi_path_length\fP (\fBNODE_STR_T\fP *node)"
  112. .br
  113. .ti -1c
  114. .RI "TSS2_RC \fBifapi_path_string\fP (char **dest, const char *supdir, \fBNODE_STR_T\fP *node, char *name)"
  115. .br
  116. .ti -1c
  117. .RI "TSS2_RC \fBifapi_path_string_n\fP (char **dest, const char *supdir, \fBNODE_STR_T\fP *node, char *name, size_t n)"
  118. .br
  119. .ti -1c
  120. .RI "bool \fBifapi_path_type_p\fP (const char *path, const char *type)"
  121. .br
  122. .ti -1c
  123. .RI "TSS2_RC \fBifapi_set_key_flags\fP (const char *type, bool policy, \fBIFAPI_KEY_TEMPLATE\fP *template)"
  124. .br
  125. .ti -1c
  126. .RI "TSS2_RC \fBifapi_set_nv_flags\fP (const char *type, \fBIFAPI_NV_TEMPLATE\fP *template, const char *policy)"
  127. .br
  128. .ti -1c
  129. .RI "TSS2_RC \fBifapi_tpm_to_fapi_signature\fP (\fBIFAPI_OBJECT\fP *sig_key_object, TPMT_SIGNATURE *tpm_signature, uint8_t **signature, size_t *signatureSize)"
  130. .br
  131. .ti -1c
  132. .RI "\fBNODE_STR_T\fP * \fBinit_string_list\fP (const char *string)"
  133. .br
  134. .ti -1c
  135. .RI "bool \fBobject_with_auth\fP (\fBIFAPI_OBJECT\fP *object)"
  136. .br
  137. .ti -1c
  138. .RI "TSS2_RC \fBpush_object_to_list\fP (void *object, \fBNODE_OBJECT_T\fP **object_list)"
  139. .br
  140. .ti -1c
  141. .RI "\fBNODE_STR_T\fP * \fBsplit_string\fP (const char *string, char *delimiter)"
  142. .br
  143. .ti -1c
  144. .RI "int \fBvasprintf\fP (char **str, const char *fmt, va_list args)"
  145. .br
  146. .ti -1c
  147. .RI "TSS2_RC \fBifapi_check_nv_index\fP (const char *path, TPM2_HANDLE nv_index)"
  148. .br
  149. .ti -1c
  150. .RI "bool \fBifapi_null_primary_p\fP (const char *path)"
  151. .br
  152. .in -1c
  153. .SH "Detailed Description"
  154. .PP
  155. Provides helper functions\&.
  156. .SH "Function Documentation"
  157. .PP
  158. .SS "bool add_string_to_list (\fBNODE_STR_T\fP * str_list, char * string)"
  159. Add string to the last element of a linked list of strings\&.
  160. .PP
  161. A duplicate of the passed string will be added\&.
  162. .PP
  163. \fBParameters:\fP
  164. .RS 4
  165. \fIstr_list\fP The linked list\&.
  166. .br
  167. \fIstring\fP The string to be added\&.
  168. .RE
  169. .PP
  170. \fBReturn values:\fP
  171. .RS 4
  172. \fItrue\fP if the string was added to the list\&.
  173. .br
  174. \fIfalse\fP if the list could not be extended\&.
  175. .RE
  176. .PP
  177. .SS "TSS2_RC append_object_to_list (void * object, \fBNODE_OBJECT_T\fP ** object_list)"
  178. Add a object as last element to a linked list\&.
  179. .PP
  180. \fBParameters:\fP
  181. .RS 4
  182. \fIobject\fP The object to be added\&.
  183. .br
  184. \fIobject_list\fP The linked list to be extended\&.
  185. .RE
  186. .PP
  187. \fBReturn values:\fP
  188. .RS 4
  189. \fITSS2_RC_SUCCESS\fP if the object was added\&.
  190. .br
  191. \fITSS2_FAPI_RC_MEMORY\fP If memory for the list extension cannot be allocated\&.
  192. .RE
  193. .PP
  194. .SS "void free_string_list (\fBNODE_STR_T\fP * node)"
  195. Free linked list of strings\&.
  196. .PP
  197. \fBParameters:\fP
  198. .RS 4
  199. \fInode\fP the first node of the linked list\&.
  200. .RE
  201. .PP
  202. .SS "TSS2_RC ifapi_asprintf (char ** str, const char * fmt, \&.\&.\&.)"
  203. Print to allocated string\&.
  204. .PP
  205. A list of parameters will be printed to an allocated string according to the format description in the first parameter\&.
  206. .PP
  207. \fBParameters:\fP
  208. .RS 4
  209. \fIstr\fP The allocated output string\&.
  210. .br
  211. \fIfmt\fP The format string (printf formats can be used\&.)
  212. .br
  213. \fI\&.\&.\&.\fP The list of objects to be printed\&.
  214. .RE
  215. .PP
  216. \fBReturn values:\fP
  217. .RS 4
  218. \fITSS2_RC_SUCCESS\fP If the printing was successful\&.
  219. .br
  220. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  221. .RE
  222. .PP
  223. .SS "TSS2_RC ifapi_calculate_pcr_digest (json_object * jso_event_list, const \fBFAPI_QUOTE_INFO\fP * quote_info, TPM2B_DIGEST * pcr_digest)"
  224. Check whether a event list corresponds to a certain quote information\&.
  225. .PP
  226. The event list is used to compute the PCR values corresponding to this event list\&. The PCR digest for these PCRs is computed and compared with the attest passed with quote_info\&.
  227. .PP
  228. \fBParameters:\fP
  229. .RS 4
  230. \fIjso_event_list\fP The event list in JSON representation\&.
  231. .br
  232. \fIquote_info\fP The information structure with the attest\&.
  233. .br
  234. \fIpcr_digest\fP The computed pcr_digest for the PCRs uses by FAPI\&.
  235. .RE
  236. .PP
  237. \fBReturn values:\fP
  238. .RS 4
  239. \fITSS2_RC_SUCCESS\fP If the PCR digest from the event list matches the PCR digest passed with the quote_info\&.
  240. .br
  241. \fITSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED\fP If the digest computed from event list does not match the attest
  242. .br
  243. \fITSS2_FAPI_RC_BAD_VALUE\fP If inappropriate values are detected in the input data\&.
  244. .br
  245. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  246. .br
  247. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  248. .br
  249. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  250. .RE
  251. .PP
  252. .SS "ifapi_check_nv_index (const char * path, TPM2_HANDLE nv_index)"
  253. Check whether NV index is appropriate for NV path\&.
  254. .PP
  255. The value will be checked based on e TCG handle registry\&.
  256. .PP
  257. \fBParameters:\fP
  258. .RS 4
  259. \fIpath\fP The path used for the NV object\&.
  260. .br
  261. \fInv_index\fP The NV index to be used\&.
  262. .RE
  263. .PP
  264. \fBReturn values:\fP
  265. .RS 4
  266. \fITSS2_RC_SUCCESS\fP If the index for the path can be determined\&.
  267. .br
  268. \fITSS2_FAPI_RC_BAD_PATH\fP If the path is not valid\&.
  269. .br
  270. \fITSS2_FAPI_RC_BAD_VALUE\fP If the nv index is not appropriate for the path\&.
  271. .br
  272. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  273. .RE
  274. .PP
  275. .SS "TSS2_RC ifapi_check_profile_pcr_selection (const TPML_PCR_SELECTION * pcr_profile, const TPML_PCR_SELECTION * pcr_capablity)"
  276. Check whether profile PCR capabilities are a subset of TPM PCR capabilities\&.
  277. .PP
  278. It has to be checked that every hash alg from the profile is available and whether the selected PCRs are available\&.
  279. .PP
  280. \fBParameters:\fP
  281. .RS 4
  282. \fIpcr_profile\fP The pcr profile to use as basis for the selection\&.
  283. .br
  284. \fIpcr_capablity\fP The PCR capabilities available for TPM\&.
  285. .RE
  286. .PP
  287. \fBReturn values:\fP
  288. .RS 4
  289. \fITSS2_RC_SUCCESSS\fP if the conversion was successful\&.
  290. .br
  291. \fITSS2_FAPI_RC_BAD_VALUE\fP if profile is not subset of capabilities\&.
  292. .RE
  293. .PP
  294. .SS "void ifapi_cleanup_policy (\fBTPMS_POLICY\fP * policy)"
  295. Free memory allocated during deserialization of policy\&.
  296. .PP
  297. The object will not be freed (might be declared on the stack)\&.
  298. .PP
  299. \fBParameters:\fP
  300. .RS 4
  301. \fIpolicy\fP The policy to be cleaned up\&.
  302. .RE
  303. .PP
  304. .SS "bool ifapi_cmp_public_key (TPM2B_PUBLIC * key1, TPM2B_PUBLIC * key2)"
  305. Compare two public keys\&.
  306. .PP
  307. \fBParameters:\fP
  308. .RS 4
  309. \fIkey1\fP The first key\&.
  310. .br
  311. \fIkey2\fP The second key\&.
  312. .RE
  313. .PP
  314. \fBReturn values:\fP
  315. .RS 4
  316. \fItrue\fP if equal false if not\&.
  317. .RE
  318. .PP
  319. .SS "TSS2_RC ifapi_compute_policy_digest (\fBTPML_PCRVALUES\fP * pcrs, TPML_PCR_SELECTION * pcr_selection, TPMI_ALG_HASH hash_alg, TPM2B_DIGEST * pcr_digest)"
  320. Compute PCR selection and a PCR digest for a PCR value list\&.
  321. .PP
  322. \fBParameters:\fP
  323. .RS 4
  324. \fIpcrs\fP The list of PCR values\&.
  325. .br
  326. \fIpcr_selection\fP The selection computed based on the list of PCR values\&.
  327. .br
  328. \fIhash_alg\fP The hash algorithm which is used for the policy computation\&.
  329. .br
  330. \fIpcr_digest\fP The computed PCR digest corresponding to the passed PCR value list\&.
  331. .RE
  332. .PP
  333. \fBReturn values:\fP
  334. .RS 4
  335. \fITSS2_RC_SUCCESS\fP if the PCR selection and the PCR digest could be computed\&.\&.
  336. .br
  337. \fITSS2_FAPI_RC_BAD_VALUE\fP If inappropriate values are detected in the input data\&.
  338. .br
  339. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  340. .br
  341. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  342. .br
  343. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  344. .RE
  345. .PP
  346. .SS "TSS2_RC ifapi_compute_quote_info (\fBIFAPI_OBJECT\fP * sig_key_object, TPM2B_ATTEST * tpm_quoted, char ** quoteInfo)"
  347. Compute the JSON representation of quote information\&.
  348. .PP
  349. The attest generated by a TPM quote will be converted into a JSON representation together with the signature scheme of the key used for the quote\&.
  350. .PP
  351. \fBParameters:\fP
  352. .RS 4
  353. \fIsig_key_object\fP The key object which was used for the quote\&.
  354. .br
  355. \fItpm_quoted\fP The attest produced by the quote\&.
  356. .br
  357. \fIquoteInfo\fP The character string with the JSON representation of the attest together with the signing schemed\&.
  358. .RE
  359. .PP
  360. \fBReturn values:\fP
  361. .RS 4
  362. \fITSS2_RC_SUCCESS\fP If the conversion was successful\&.
  363. .br
  364. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  365. .br
  366. \fITSS2_FAPI_RC_BAD_VALUE\fP If an invalid value is detected during serialisation\&.
  367. .br
  368. \fIPossible\fP error codes of the unmarshaling function\&.
  369. .br
  370. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  371. .br
  372. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  373. .RE
  374. .PP
  375. .SS "\fBTPMS_POLICY\fP * ifapi_copy_policy (const \fBTPMS_POLICY\fP * from_policy)"
  376. Copy policy\&.
  377. .PP
  378. \fBParameters:\fP
  379. .RS 4
  380. \fIfrom_policy\fP the policy to be copied\&.
  381. .RE
  382. .PP
  383. \fBReturn values:\fP
  384. .RS 4
  385. \fIThe\fP new policy or NULL if not enough memory was available\&.
  386. .br
  387. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  388. .br
  389. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  390. .RE
  391. .PP
  392. .SS "TSS2_RC ifapi_create_dirs (const char * supdir, const char * path)"
  393. Create sub-directories in a certain directory\&.
  394. .PP
  395. \fBParameters:\fP
  396. .RS 4
  397. \fIsupdir\fP The directory in which the new directories shall be created\&.
  398. .br
  399. \fIpath\fP The path containing one or more sub-directories\&.
  400. .RE
  401. .PP
  402. \fBReturn values:\fP
  403. .RS 4
  404. \fITSS2_RC_SUCCESS\fP If the directories were created\&.
  405. .br
  406. \fITSS2_FAPI_RC_MEMORY\fP If the linked list with the sub-directories cannot be allocated\&.
  407. .br
  408. \fITSS2_FAPI_RC_BAD_VALUE\fP If a directory cannot be created\&.
  409. .RE
  410. .PP
  411. .SS "TSS2_RC ifapi_extend_vpcr (TPM2B_DIGEST * vpcr, TPMI_ALG_HASH bank, const \fBIFAPI_EVENT\fP * event)"
  412. Compute new PCR value from a part of an event list\&.
  413. .PP
  414. \fBParameters:\fP
  415. .RS 4
  416. \fIvpcr\fP The old and the new PCR value\&.
  417. .br
  418. \fIbank\fP The bank corresponding to value of the event list which will be used for computation\&.
  419. .br
  420. \fIevent\fP The event list with the values which were extended for a certain bank\&.
  421. .RE
  422. .PP
  423. \fBReturn values:\fP
  424. .RS 4
  425. \fITSS2_FAPI_RC_BAD_VALUE\fP if the bank was not found in the event list\&.
  426. .br
  427. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
  428. .br
  429. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  430. .br
  431. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  432. .RE
  433. .PP
  434. .SS "TSS2_RC ifapi_filter_pcr_selection_by_index (TPML_PCR_SELECTION * pcr_selection, const TPM2_HANDLE * pcr_index, size_t pcr_count)"
  435. Reduce a PCR selection to a single pcr\&.
  436. .PP
  437. This includes two steps: clearing all bits but the selected and clearing empty hashalg lines\&.
  438. .PP
  439. \fBParameters:\fP
  440. .RS 4
  441. \fIpcr_selection\fP The pcr selection to be filtered\&.
  442. .br
  443. \fIpcr_index\fP The only PCR to remain selected\&.
  444. .br
  445. \fIpcr_count\fP The size of the pcr list\&.
  446. .RE
  447. .PP
  448. \fBReturn values:\fP
  449. .RS 4
  450. \fITSS2_RC_SUCCESS\fP if the filtering was successful\&.
  451. .br
  452. \fITSS2_FAPI_RC_BAD_VALUE\fP if no pcr remain selected or the pcr selection is malformed\&.
  453. .RE
  454. .PP
  455. .SS "void ifapi_free_node_list (\fBNODE_OBJECT_T\fP * node)"
  456. Free linked list of IFAPI objects (link nodes only)\&.
  457. .PP
  458. \fBParameters:\fP
  459. .RS 4
  460. \fInode\fP the first node of the linked list\&.
  461. .RE
  462. .PP
  463. .SS "void ifapi_free_object_list (\fBNODE_OBJECT_T\fP * node)"
  464. Free linked list of IFAPI objects\&.
  465. .PP
  466. \fBParameters:\fP
  467. .RS 4
  468. \fInode\fP the first node of the linked list\&.
  469. .RE
  470. .PP
  471. .SS "int ifapi_get_curl_buffer (unsigned char * url, unsigned char ** buffer, size_t * buffer_size)"
  472. Get byte buffer from file system or web via curl\&.
  473. .PP
  474. \fBParameters:\fP
  475. .RS 4
  476. \fIurl\fP The url of the resource\&.
  477. .br
  478. \fIbuffer\fP The buffer retrieved via the url\&.
  479. .br
  480. \fIbuffer_size\fP The size of the retrieved object\&.
  481. .RE
  482. .PP
  483. \fBReturn values:\fP
  484. .RS 4
  485. \fI0\fP if buffer could be retrieved\&.
  486. .br
  487. \fI-1\fP if an error did occur
  488. .RE
  489. .PP
  490. .SS "\fBESYS_TR\fP ifapi_get_hierary_handle (const char * path)"
  491. Get ESYS handle for a hierarchy path\&.
  492. .PP
  493. \fBParameters:\fP
  494. .RS 4
  495. \fIpath\fP The path to be checked\&.
  496. .RE
  497. .PP
  498. \fBReturn values:\fP
  499. .RS 4
  500. \fIThe\fP ESAPI handle for the hierarchy defined in path\&.
  501. .br
  502. \fI0\fP if not handle can be assigned\&.
  503. .RE
  504. .PP
  505. .SS "TSS2_RC ifapi_get_name (TPMT_PUBLIC * publicInfo, TPM2B_NAME * name)"
  506. Compute the name of a TPM transient or persistent object\&.
  507. .PP
  508. \fBParameters:\fP
  509. .RS 4
  510. \fIpublicInfo\fP The public information of the TPM object\&.
  511. .br
  512. \fIname\fP The computed name\&.
  513. .RE
  514. .PP
  515. \fBReturn values:\fP
  516. .RS 4
  517. \fITPM2_RC_SUCCESS\fP or one of the possible errors TSS2_FAPI_RC_BAD_VALUE, TSS2_FAPI_RC_MEMORY, TSS2_FAPI_RC_GENERAL_FAILURE\&. or return codes of SAPI errors\&.
  518. .br
  519. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  520. .br
  521. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  522. .br
  523. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  524. .br
  525. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  526. .RE
  527. .PP
  528. .SS "TSS2_RC ifapi_get_nv_start_index (const char * path, TPM2_HANDLE * start_nv_index)"
  529. Determine start index for NV object depending on type\&.
  530. .PP
  531. The value will be determined based on e TCG handle registry\&.
  532. .PP
  533. \fBParameters:\fP
  534. .RS 4
  535. \fIpath\fP The path used for the NV object\&.
  536. .br
  537. \fIstart_nv_index\fP The first possible NV index for this type\&.
  538. .RE
  539. .PP
  540. \fBReturn values:\fP
  541. .RS 4
  542. \fITSS2_RC_SUCCESS\fP If the index for the path can be determined\&.
  543. .br
  544. \fITSS2_FAPI_RC_BAD_PATH\fP If no handle can be assigned\&.
  545. .br
  546. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  547. .RE
  548. .PP
  549. .SS "TSS2_RC ifapi_get_quote_info (char const * quoteInfo, TPM2B_ATTEST * tpm_quoted, \fBFAPI_QUOTE_INFO\fP * fapi_quote_info)"
  550. Deserialize the JSON representation of FAPI quote information\&.
  551. .PP
  552. The JSON representation of FAPI quote information will be deserialized to a \fBFAPI_QUOTE_INFO\fP structure and also the TPM2B version of the attest will be created\&.
  553. .PP
  554. \fBParameters:\fP
  555. .RS 4
  556. \fIquoteInfo\fP The JSON representation if the quote information\&.
  557. .br
  558. \fItpm_quoted\fP The marhaled version of the attest structure\&.
  559. .br
  560. \fIfapi_quote_info\fP The quote information structure used by FAPI\&.
  561. .RE
  562. .PP
  563. \fBReturn values:\fP
  564. .RS 4
  565. \fITSS2_RC_SUCCESS\fP If the deserialization was successful\&.
  566. .br
  567. \fITSS2_FAPI_RC_BAD_VALUE\fP If an invalid value is detected during deserialisation\&.
  568. .br
  569. \fIPossible\fP error codes of the marshaling function\&.
  570. .br
  571. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  572. .RE
  573. .PP
  574. .SS "bool ifapi_hierarchy_path_p (const char * path)"
  575. Determine whether path describes a hierarchy object\&.
  576. .PP
  577. It will be checked whether the path describes a hierarch\&. A key path with a hierarchy will not deliver true\&.
  578. .PP
  579. \fBParameters:\fP
  580. .RS 4
  581. \fIpath\fP The path to be checked\&.
  582. .RE
  583. .PP
  584. \fBReturn values:\fP
  585. .RS 4
  586. \fItrue\fP if the path describes a hierarchy\&.
  587. .br
  588. \fIfalse\fP if not\&.
  589. .RE
  590. .PP
  591. .SS "void ifapi_init_hierarchy_object (\fBIFAPI_OBJECT\fP * hierarchy, \fBESYS_TR\fP esys_handle)"
  592. Initialize the internal representation of a FAPI hierarchy object\&.
  593. .PP
  594. The object will be cleared and the type of the general fapi object will be set to hierarchy\&.
  595. .PP
  596. \fBParameters:\fP
  597. .RS 4
  598. \fIhierarchy\fP The caller allocated hierarchy object\&. The name of the object will be computed\&.
  599. .br
  600. \fIesys_handle\fP The ESAPI handle of the hierarchy which will be added to to the object\&.
  601. .RE
  602. .PP
  603. .SS "ifapi_null_primary_p (const char * path)"
  604. Determine whether path is a primary in the null hierarchy\&.
  605. .PP
  606. \fBParameters:\fP
  607. .RS 4
  608. \fIpath\fP The path to be checked\&.
  609. .RE
  610. .PP
  611. \fBReturn values:\fP
  612. .RS 4
  613. \fItrue\fP if the path describes a null hierarchy primary\&.
  614. .br
  615. \fIfalse\fP if not\&.
  616. .RE
  617. .PP
  618. .SS "TSS2_RC ifapi_nv_get_name (TPM2B_NV_PUBLIC * publicInfo, TPM2B_NAME * name)"
  619. Compute the name from the public data of a NV index\&.
  620. .PP
  621. The name of a NV index is computed as follows: name = nameAlg||Hash(nameAlg,marshal(publicArea))
  622. .PP
  623. \fBParameters:\fP
  624. .RS 4
  625. \fIpublicInfo\fP The public information of the NV index\&.
  626. .br
  627. \fIname\fP The computed name\&.
  628. .RE
  629. .PP
  630. \fBReturn values:\fP
  631. .RS 4
  632. \fITSS2_RC_SUCCESS\fP on success\&.
  633. .br
  634. \fITSS2_FAPI_RC_MEMORY\fP Memory can not be allocated\&.
  635. .br
  636. \fITSS2_FAPI_RC_BAD_VALUE\fP for invalid parameters\&.
  637. .br
  638. \fITSS2_FAPI_RC_BAD_REFERENCE\fP for unexpected NULL pointer parameters\&.
  639. .br
  640. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP for errors of the crypto library\&.
  641. .br
  642. \fITSS2_SYS_RC_*\fP for SAPI errors\&.
  643. .RE
  644. .PP
  645. .SS "TSS2_RC ifapi_object_cmp_name (\fBIFAPI_OBJECT\fP * object, void * name, bool * equal)"
  646. Check whether a nv or key object has a certain name\&.
  647. .PP
  648. \fBParameters:\fP
  649. .RS 4
  650. \fIobject\fP The object (has to be checked whether it's a key)\&.
  651. .br
  652. \fIname\fP The name to be compared\&.
  653. .br
  654. \fIequal\fP If the two names are equal\&.
  655. .RE
  656. .PP
  657. \fBReturn values:\fP
  658. .RS 4
  659. \fITSS2_RC_SUCCESSS\fP if name of object can be deserialized\&.
  660. .br
  661. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  662. .br
  663. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  664. .br
  665. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  666. .br
  667. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  668. .RE
  669. .PP
  670. .SS "TSS2_RC ifapi_object_cmp_nv_public (\fBIFAPI_OBJECT\fP * object, void * nv_public, bool * equal)"
  671. Check whether a nv object has a certain public info\&.
  672. .PP
  673. \fBParameters:\fP
  674. .RS 4
  675. \fIobject\fP The object (has to be checked whether it's a key)\&.
  676. .br
  677. \fInv_public\fP The NV public data with the NV index\&.
  678. .br
  679. \fIequal\fP If the two names are equal\&.
  680. .RE
  681. .PP
  682. \fBReturn values:\fP
  683. .RS 4
  684. \fITSS2_RC_SUCCESSS\fP if name of object can be deserialized\&.
  685. .RE
  686. .PP
  687. .SS "size_t ifapi_path_length (\fBNODE_STR_T\fP * node)"
  688. Compute the number on nodes in a linked list\&.
  689. .PP
  690. \fBParameters:\fP
  691. .RS 4
  692. \fInode\fP the first node of the linked list\&.
  693. .RE
  694. .PP
  695. \fBReturn values:\fP
  696. .RS 4
  697. \fIthe\fP number on nodes\&.
  698. .RE
  699. .PP
  700. .SS "TSS2_RC ifapi_path_string (char ** dest, const char * supdir, \fBNODE_STR_T\fP * node, char * name)"
  701. Compute a pathname based on a linked list of strings\&.
  702. .PP
  703. \fBParameters:\fP
  704. .RS 4
  705. \fIdest\fP The pointer to the generated pathname (callee allocated)\&.
  706. .br
  707. \fIsupdir\fP A sup directory will be the prefix of the pathname\&.
  708. .br
  709. \fInode\fP The linked list\&.
  710. .br
  711. \fIname\fP A name which is appended to the result if not NULL\&.
  712. .RE
  713. .PP
  714. \fBReturn values:\fP
  715. .RS 4
  716. \fITSS2_RC_SUCCESS\fP if the function call was a success\&.
  717. .br
  718. \fITSS2_FAPI_RC_MEMORY\fP if the memory for the pathname can't be allocated\&.
  719. .RE
  720. .PP
  721. .SS "TSS2_RC ifapi_path_string_n (char ** dest, const char * supdir, \fBNODE_STR_T\fP * node, char * name, size_t n)"
  722. Compute a pathname based on the first n elements of a linked list of strings\&.
  723. .PP
  724. \fBParameters:\fP
  725. .RS 4
  726. \fIdest\fP the pointer to the pathname (callee allocated)\&.
  727. .br
  728. \fIsupdir\fP a sup directory will be the prefix of the pathname\&. (can be NULL)\&.
  729. .br
  730. \fInode\fP the linked list\&.
  731. .br
  732. \fIname\fP the filename (can be NULL)\&.
  733. .br
  734. \fIn\fP the number of the first elements which will bes used for concatenation\&.
  735. .RE
  736. .PP
  737. \fBReturn values:\fP
  738. .RS 4
  739. \fITSS2_RC_SUCCESS\fP if the function call was a success\&.
  740. .br
  741. \fITSS2_FAPI_RC_MEMORY\fP if the memory for the pathname can't be allocated\&.
  742. .RE
  743. .PP
  744. .SS "bool ifapi_path_type_p (const char * path, const char * type)"
  745. Determine whether path is of certain type\&.
  746. .PP
  747. \fBParameters:\fP
  748. .RS 4
  749. \fIpath\fP The path to be checked\&.
  750. .br
  751. \fItype\fP sub-string at the beginning of the path to be checked\&.
  752. .RE
  753. .PP
  754. \fBReturn values:\fP
  755. .RS 4
  756. \fItrue\fP if the path name starts with type\&.
  757. .br
  758. \fIfalse\fP if not\&.
  759. .RE
  760. .PP
  761. .SS "TSS2_RC ifapi_set_key_flags (const char * type, bool policy, \fBIFAPI_KEY_TEMPLATE\fP * template)"
  762. Create template for key creation based on type flags\&.
  763. .PP
  764. Based on passed flags the TPM2B_PUBLIC data which is used for key creation will be adapted\&.
  765. .PP
  766. \fBParameters:\fP
  767. .RS 4
  768. \fItype\fP The flags describing the key type\&.
  769. .br
  770. \fIpolicy\fP The flag whether a policy is used\&.
  771. .br
  772. \fItemplate\fP The template including the TPM2B_PUBLIC which will be used for key creation\&.
  773. .RE
  774. .PP
  775. \fBReturn values:\fP
  776. .RS 4
  777. \fITSS2_RC_SUCCESS\fP if the template can be generated\&.
  778. .br
  779. \fITSS2_FAPI_RC_BAD_VALUE\fP If an invalid combination of flags was used\&.
  780. .br
  781. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  782. .RE
  783. .PP
  784. .SS "TSS2_RC ifapi_set_nv_flags (const char * type, \fBIFAPI_NV_TEMPLATE\fP * template, const char * policy)"
  785. Create template for nv object creation based on type flags\&.
  786. .PP
  787. Based on passed flags the TPM2B_NV_PUBLIC data which is used for key creation will be adapted\&.
  788. .PP
  789. \fBParameters:\fP
  790. .RS 4
  791. \fItype\fP The flags describing the nv object type\&.
  792. .br
  793. \fIpolicy\fP The flag whether a policy is used\&.
  794. .br
  795. \fItemplate\fP The template including the TPM2B_NV_PUBLIC which will be used for nv object creation\&.
  796. .RE
  797. .PP
  798. \fBReturn values:\fP
  799. .RS 4
  800. \fITSS2_RC_SUCCESS\fP if the template can be generated\&.
  801. .br
  802. \fITSS2_FAPI_RC_BAD_VALUE\fP If an invalid combination of flags was used\&.
  803. .br
  804. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  805. .RE
  806. .PP
  807. .SS "bool ifapi_TPM2B_DIGEST_cmp (TPM2B_DIGEST * in1, TPM2B_DIGEST * in2)"
  808. Compare two variables of type TPM2B_DIGEST\&.
  809. .PP
  810. \fBParameters:\fP
  811. .RS 4
  812. \fIin1\fP variable to be compared with in2\&.
  813. .br
  814. \fIin2\fP variable to be compared with in1\&.
  815. .RE
  816. .PP
  817. \fBReturn values:\fP
  818. .RS 4
  819. \fItrue\fP if the variables are equal\&.
  820. .br
  821. \fIfalse\fP if not\&.
  822. .RE
  823. .PP
  824. .SS "bool ifapi_TPM2B_ECC_PARAMETER_cmp (TPM2B_ECC_PARAMETER * in1, TPM2B_ECC_PARAMETER * in2)"
  825. Compare two variables of type TPM2B_ECC_PARAMETER\&.
  826. .PP
  827. \fBParameters:\fP
  828. .RS 4
  829. \fIin1\fP variable to be compared with in2\&.
  830. .br
  831. \fIin2\fP variable to be compared with in1\&.
  832. .RE
  833. .PP
  834. \fBReturn values:\fP
  835. .RS 4
  836. \fItrue\fP if the variables are equal\&.
  837. .br
  838. \fIfalse\fP if not\&.
  839. .RE
  840. .PP
  841. .SS "bool ifapi_TPM2B_PUBLIC_KEY_RSA_cmp (TPM2B_PUBLIC_KEY_RSA * in1, TPM2B_PUBLIC_KEY_RSA * in2)"
  842. Compare two variables of type TPM2B_PUBLIC_KEY_RSA\&.
  843. .PP
  844. \fBParameters:\fP
  845. .RS 4
  846. \fIin1\fP variable to be compared with in2
  847. .br
  848. \fIin2\fP variable to be compared with in1
  849. .RE
  850. .PP
  851. \fBReturn values:\fP
  852. .RS 4
  853. \fItrue\fP if the variables are equal\&.
  854. .br
  855. \fIfalse\fP if not\&.
  856. .RE
  857. .PP
  858. .SS "TSS2_RC ifapi_tpm_to_fapi_signature (\fBIFAPI_OBJECT\fP * sig_key_object, TPMT_SIGNATURE * tpm_signature, uint8_t ** signature, size_t * signatureSize)"
  859. Compute signature as byte array and signature size in DER format\&.
  860. .PP
  861. For ECC signatures the conversion to DER is necessary, for RSA the buffer of the TPM2B has already DER format\&. parameters\&.
  862. .PP
  863. \fBParameters:\fP
  864. .RS 4
  865. \fIsig_key_object\fP The signing key\&.
  866. .br
  867. \fItpm_signature\fP the signature in TPM format\&.
  868. .br
  869. \fIsignature\fP The byte array of the signature (callee allocated)\&.
  870. .br
  871. \fIsignatureSize\fP The size of the byte array\&.
  872. .RE
  873. .PP
  874. \fBReturn values:\fP
  875. .RS 4
  876. \fITSS2_RC_SUCCESSS\fP if the conversion was successful\&.
  877. .br
  878. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  879. .br
  880. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP If an internal error occurs, which is not covered by other return codes (e\&.g\&. a unexpected openssl error)\&.
  881. .br
  882. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  883. .br
  884. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  885. .RE
  886. .PP
  887. .SS "bool ifapi_TPMS_ECC_POINT_cmp (TPMS_ECC_POINT * in1, TPMS_ECC_POINT * in2)"
  888. Compare two variables of type TPMS_ECC_POINT\&.
  889. .PP
  890. \fBParameters:\fP
  891. .RS 4
  892. \fIin1\fP variable to be compared with in2\&.
  893. .br
  894. \fIin2\fP variable to be compared with in1\&.
  895. .RE
  896. .PP
  897. \fBReturn values:\fP
  898. .RS 4
  899. \fItrue\fP if the variables are equal\&.
  900. .br
  901. \fIfalse\fP if not\&.
  902. .RE
  903. .PP
  904. .SS "bool ifapi_TPMT_PUBLIC_cmp (TPMT_PUBLIC * in1, TPMT_PUBLIC * in2)"
  905. Compare the PUBLIC_ID stored in two TPMT_PUBLIC structures\&.
  906. .PP
  907. \fBParameters:\fP
  908. .RS 4
  909. \fIin1\fP the public data with the unique data to be compared with:
  910. .br
  911. \fIin2\fP
  912. .RE
  913. .PP
  914. \fBReturn values:\fP
  915. .RS 4
  916. \fItrue\fP if the variables are equal\&.
  917. .br
  918. \fIfalse\fP if not\&.
  919. .RE
  920. .PP
  921. .SS "bool ifapi_TPMU_PUBLIC_ID_cmp (TPMU_PUBLIC_ID * in1, UINT32 selector1, TPMU_PUBLIC_ID * in2, UINT32 selector2)"
  922. Compare two variables of type TPMU_PUBLIC_ID\&.
  923. .PP
  924. \fBParameters:\fP
  925. .RS 4
  926. \fIin1\fP variable to be compared with in2\&.
  927. .br
  928. \fIselector1\fP key type of first key\&.
  929. .br
  930. \fIin2\fP variable to be compared with in1\&.
  931. .br
  932. \fIselector2\fP key type of second key\&.
  933. .RE
  934. .PP
  935. \fBReturns:\fP
  936. .RS 4
  937. true if variables are equal\&.
  938. .PP
  939. false if not\&.
  940. .RE
  941. .PP
  942. .SS "\fBNODE_STR_T\fP * init_string_list (const char * string)"
  943. Initialize a linked list of strings\&.
  944. .PP
  945. free string in the list object will be set to true\&. If the list will be extended by sub-string which are part of this strin free_string has to be set to false\&.
  946. .PP
  947. \fBParameters:\fP
  948. .RS 4
  949. \fIstring\fP The string for the first element\&.
  950. .RE
  951. .PP
  952. \fBReturn values:\fP
  953. .RS 4
  954. \fIthe\fP initial node of the linked list\&.
  955. .br
  956. \fINULL\fP if the list cannot be created\&.
  957. .RE
  958. .PP
  959. .SS "bool object_with_auth (\fBIFAPI_OBJECT\fP * object)"
  960. Determine whether authentication with an auth value is needed ro an object\&.\&.
  961. .PP
  962. In the key store the information whether an auth value was provided for an object is saved\&. Thus the it is possible to decide whether the auth value callback is required for authentication\&.
  963. .PP
  964. \fBParameters:\fP
  965. .RS 4
  966. \fIobject\fP The object which has to be checked\&.\&.
  967. .RE
  968. .PP
  969. \fBReturn values:\fP
  970. .RS 4
  971. \fItrue\fP If an auth value was provided\&.
  972. .br
  973. \fIfalse\fP If not\&.
  974. .RE
  975. .PP
  976. .SS "TSS2_RC push_object_to_list (void * object, \fBNODE_OBJECT_T\fP ** object_list)"
  977. Add a object as first element to a linked list\&.
  978. .PP
  979. \fBParameters:\fP
  980. .RS 4
  981. \fIobject\fP The object to be added\&.
  982. .br
  983. \fIobject_list\fP The linked list to be extended\&.
  984. .RE
  985. .PP
  986. \fBReturn values:\fP
  987. .RS 4
  988. \fITSS2_RC_SUCCESS\fP if the object was added\&.
  989. .br
  990. \fITSS2_FAPI_RC_MEMORY\fP If memory for the list extension cannot be allocated\&.
  991. .RE
  992. .PP
  993. .SS "\fBNODE_STR_T\fP * split_string (const char * string, char * delimiter)"
  994. Divides str into substrings based on a delimiter\&.
  995. .PP
  996. \fBParameters:\fP
  997. .RS 4
  998. \fIstring\fP the string to split\&.
  999. .br
  1000. \fIdelimiter\fP the delimiter\&.
  1001. .RE
  1002. .PP
  1003. \fBReturn values:\fP
  1004. .RS 4
  1005. \fIThe\fP linked list of substrings\&.
  1006. .br
  1007. \fINULL\fP if the list cannot be created\&.
  1008. .RE
  1009. .PP
  1010. .SS "int vasprintf (char ** str, const char * fmt, va_list args)"
  1011. Print to allocated string\&.
  1012. .PP
  1013. A list of parameters will be printed to an allocated string according to the format description in the first parameter\&.
  1014. .PP
  1015. \fBParameters:\fP
  1016. .RS 4
  1017. \fIstr\fP The allocated output string\&.
  1018. .br
  1019. \fIfmt\fP The format string (printf formats can be used\&.)
  1020. .br
  1021. \fIargs\fP The list of objects to be printed\&.
  1022. .RE
  1023. .PP
  1024. \fBReturn values:\fP
  1025. .RS 4
  1026. \fIint\fP The size of the string ff the printing was successful\&.
  1027. .br
  1028. \fI-1\fP if not enough memory can be allocated\&.
  1029. .RE
  1030. .PP
  1031. .SH "Author"
  1032. .PP
  1033. Generated automatically by Doxygen for tpm2-tss from the source code\&.