ifapi_keystore.3 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. .TH "ifapi_keystore" 3 "Fri Oct 7 2022" "Version 3.2.0" "tpm2-tss" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. ifapi_keystore
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Functions"
  10. .in +1c
  11. .ti -1c
  12. .RI "void \fBifapi_cleanup_ifapi_duplicate\fP (\fBIFAPI_DUPLICATE\fP *duplicate)"
  13. .br
  14. .ti -1c
  15. .RI "void \fBifapi_cleanup_ifapi_ext_pub_key\fP (\fBIFAPI_EXT_PUB_KEY\fP *key)"
  16. .br
  17. .ti -1c
  18. .RI "void \fBifapi_cleanup_ifapi_hierarchy\fP (\fBIFAPI_HIERARCHY\fP *hierarchy)"
  19. .br
  20. .ti -1c
  21. .RI "void \fBifapi_cleanup_ifapi_key\fP (\fBIFAPI_KEY\fP *key)"
  22. .br
  23. .ti -1c
  24. .RI "void \fBifapi_cleanup_ifapi_keystore\fP (\fBIFAPI_KEYSTORE\fP *keystore)"
  25. .br
  26. .ti -1c
  27. .RI "void \fBifapi_cleanup_ifapi_nv\fP (\fBIFAPI_NV\fP *nv)"
  28. .br
  29. .ti -1c
  30. .RI "void \fBifapi_cleanup_ifapi_object\fP (\fBIFAPI_OBJECT\fP *object)"
  31. .br
  32. .ti -1c
  33. .RI "TSS2_RC \fBifapi_copy_ifapi_key\fP (\fBIFAPI_KEY\fP *dest, const \fBIFAPI_KEY\fP *src)"
  34. .br
  35. .ti -1c
  36. .RI "TSS2_RC \fBifapi_copy_ifapi_key_object\fP (\fBIFAPI_OBJECT\fP *dest, const \fBIFAPI_OBJECT\fP *src)"
  37. .br
  38. .ti -1c
  39. .RI "TSS2_RC \fBifapi_keystore_delete\fP (\fBIFAPI_KEYSTORE\fP *keystore, char *path)"
  40. .br
  41. .ti -1c
  42. .RI "TSS2_RC \fBifapi_keystore_initialize\fP (\fBIFAPI_KEYSTORE\fP *keystore, const char *config_systemdir, const char *config_userdir, const char *config_defaultprofile)"
  43. .br
  44. .ti -1c
  45. .RI "TSS2_RC \fBifapi_keystore_list_all\fP (\fBIFAPI_KEYSTORE\fP *keystore, const char *searchpath, char ***results, size_t *numresults)"
  46. .br
  47. .ti -1c
  48. .RI "TSS2_RC \fBifapi_keystore_load_async\fP (\fBIFAPI_KEYSTORE\fP *keystore, \fBIFAPI_IO\fP *io, const char *path)"
  49. .br
  50. .ti -1c
  51. .RI "TSS2_RC \fBifapi_keystore_load_finish\fP (\fBIFAPI_KEYSTORE\fP *keystore, \fBIFAPI_IO\fP *io, \fBIFAPI_OBJECT\fP *object)"
  52. .br
  53. .ti -1c
  54. .RI "TSS2_RC \fBifapi_keystore_remove_directories\fP (\fBIFAPI_KEYSTORE\fP *keystore, const char *dir_name)"
  55. .br
  56. .ti -1c
  57. .RI "TSS2_RC \fBifapi_keystore_search_nv_obj\fP (\fBIFAPI_KEYSTORE\fP *keystore, \fBIFAPI_IO\fP *io, TPM2B_NV_PUBLIC *nv_public, char **found_path)"
  58. .br
  59. .ti -1c
  60. .RI "TSS2_RC \fBifapi_keystore_search_obj\fP (\fBIFAPI_KEYSTORE\fP *keystore, \fBIFAPI_IO\fP *io, TPM2B_NAME *name, char **found_path)"
  61. .br
  62. .ti -1c
  63. .RI "TSS2_RC \fBifapi_keystore_store_async\fP (\fBIFAPI_KEYSTORE\fP *keystore, \fBIFAPI_IO\fP *io, const char *path, const \fBIFAPI_OBJECT\fP *object)"
  64. .br
  65. .ti -1c
  66. .RI "TSS2_RC \fBifapi_copy_ifapi_hierarchy\fP (\fBIFAPI_HIERARCHY\fP *dest, const \fBIFAPI_HIERARCHY\fP *src)"
  67. .br
  68. .ti -1c
  69. .RI "TSS2_RC \fBifapi_copy_ifapi_hierarchy_object\fP (\fBIFAPI_OBJECT\fP *dest, const \fBIFAPI_OBJECT\fP *src)"
  70. .br
  71. .ti -1c
  72. .RI "TSS2_RC \fBifapi_keystore_object_does_not_exist\fP (\fBIFAPI_KEYSTORE\fP *keystore, const char *path, const \fBIFAPI_OBJECT\fP *object)"
  73. .br
  74. .in -1c
  75. .SH "Detailed Description"
  76. .PP
  77. Provides internal fapi functions for reading and writing to the key store\&.
  78. .SH "Function Documentation"
  79. .PP
  80. .SS "void ifapi_cleanup_ifapi_duplicate (\fBIFAPI_DUPLICATE\fP * duplicate)"
  81. Free memory allocated during deserialization of a duplicate object\&.
  82. .PP
  83. The duplicate object will not be freed (might be declared on the stack)\&.
  84. .PP
  85. \fBParameters:\fP
  86. .RS 4
  87. \fIduplicate\fP The duplicate object to be cleaned up\&.
  88. .RE
  89. .PP
  90. .SS "void ifapi_cleanup_ifapi_ext_pub_key (\fBIFAPI_EXT_PUB_KEY\fP * key)"
  91. Free memory allocated during deserialization of a pubkey object\&.
  92. .PP
  93. The pubkey will not be freed (might be declared on the stack)\&.
  94. .PP
  95. \fBParameters:\fP
  96. .RS 4
  97. \fIkey\fP The pubkey object to be cleaned up\&.
  98. .RE
  99. .PP
  100. .SS "void ifapi_cleanup_ifapi_hierarchy (\fBIFAPI_HIERARCHY\fP * hierarchy)"
  101. Free memory allocated during deserialization of a hierarchy object\&.
  102. .PP
  103. The hierarchy object will not be freed (might be declared on the stack)\&.
  104. .PP
  105. \fBParameters:\fP
  106. .RS 4
  107. \fIhierarchy\fP The hierarchy object to be cleaned up\&.
  108. .RE
  109. .PP
  110. .SS "void ifapi_cleanup_ifapi_key (\fBIFAPI_KEY\fP * key)"
  111. Free memory allocated during deserialization of a key object\&.
  112. .PP
  113. The key will not be freed (might be declared on the stack)\&.
  114. .PP
  115. \fBParameters:\fP
  116. .RS 4
  117. \fIkey\fP The key object to be cleaned up\&.
  118. .RE
  119. .PP
  120. .SS "void ifapi_cleanup_ifapi_keystore (\fBIFAPI_KEYSTORE\fP * keystore)"
  121. Free keystore related memory allocated during FAPI initialization\&.
  122. .PP
  123. The keystore object will not be freed (might be declared on the stack)\&.
  124. .PP
  125. \fBParameters:\fP
  126. .RS 4
  127. \fIkeystore\fP The kystore object to be cleaned up\&.
  128. .RE
  129. .PP
  130. .SS "void ifapi_cleanup_ifapi_nv (\fBIFAPI_NV\fP * nv)"
  131. Free memory allocated during deserialization of a nv object\&.
  132. .PP
  133. The nv object will not be freed (might be declared on the stack)\&.
  134. .PP
  135. \fBParameters:\fP
  136. .RS 4
  137. \fInv\fP The nv object to be cleaned up\&.
  138. .RE
  139. .PP
  140. .SS "void ifapi_cleanup_ifapi_object (\fBIFAPI_OBJECT\fP * object)"
  141. Free memory allocated during deserialization of object\&.
  142. .PP
  143. The object will not be freed (might be declared on the stack)\&.
  144. .PP
  145. \fBParameters:\fP
  146. .RS 4
  147. \fIobject\fP The object to be cleaned up\&.
  148. .RE
  149. .PP
  150. .SS "ifapi_copy_ifapi_hierarchy (\fBIFAPI_HIERARCHY\fP * dest, const \fBIFAPI_HIERARCHY\fP * src)"
  151. Create a copy of a an ifapi hierarchy\&.
  152. .PP
  153. \fBParameters:\fP
  154. .RS 4
  155. \fIdest\fP The caller allocated hierarchy object which will be the destination of the copy operation\&.
  156. .br
  157. \fIsrc\fP The source hierarchy\&.
  158. .RE
  159. .PP
  160. \fBReturn values:\fP
  161. .RS 4
  162. \fITSS2_RC_SUCCESS\fP if the function call was a success\&.
  163. .br
  164. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  165. .br
  166. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  167. .RE
  168. .PP
  169. .SS "ifapi_copy_ifapi_hierarchy_object (\fBIFAPI_OBJECT\fP * dest, const \fBIFAPI_OBJECT\fP * src)"
  170. Create a copy of a an ifapi object storing a hierarchy\&.
  171. .PP
  172. The hierarchy together with the policy of the hierarchy will be copied\&.
  173. .PP
  174. \fBParameters:\fP
  175. .RS 4
  176. \fIdest\fP The caller allocated hierarchy object which will be the destination of the copy operation\&.
  177. .br
  178. \fIsrc\fP The source hieararchy\&.
  179. .RE
  180. .PP
  181. \fBReturn values:\fP
  182. .RS 4
  183. \fITSS2_RC_SUCCESS\fP if the function call was a success\&.
  184. .br
  185. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if the source is not of type key\&.
  186. .br
  187. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  188. .br
  189. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  190. .RE
  191. .PP
  192. .SS "TSS2_RC ifapi_copy_ifapi_key (\fBIFAPI_KEY\fP * dest, const \fBIFAPI_KEY\fP * src)"
  193. Create a copy of a an ifapi key\&.
  194. .PP
  195. \fBParameters:\fP
  196. .RS 4
  197. \fIdest\fP The caller allocated key object which will be the destination of the copy operation\&.
  198. .br
  199. \fIsrc\fP The source key\&.
  200. .RE
  201. .PP
  202. \fBReturn values:\fP
  203. .RS 4
  204. \fITSS2_RC_SUCCESS\fP if the function call was a success\&.
  205. .br
  206. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  207. .br
  208. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  209. .RE
  210. .PP
  211. .SS "TSS2_RC ifapi_copy_ifapi_key_object (\fBIFAPI_OBJECT\fP * dest, const \fBIFAPI_OBJECT\fP * src)"
  212. Create a copy of a an ifapi object storing a key\&.
  213. .PP
  214. The key together with the policy of the key will be copied\&.
  215. .PP
  216. \fBParameters:\fP
  217. .RS 4
  218. \fIdest\fP The caller allocated key object which will be the destination of the copy operation\&.
  219. .br
  220. \fIsrc\fP The source key\&.
  221. .RE
  222. .PP
  223. \fBReturn values:\fP
  224. .RS 4
  225. \fITSS2_RC_SUCCESS\fP if the function call was a success\&.
  226. .br
  227. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if the source is not of type key\&.
  228. .br
  229. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  230. .br
  231. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  232. .RE
  233. .PP
  234. .SS "TSS2_RC ifapi_keystore_delete (\fBIFAPI_KEYSTORE\fP * keystore, char * path)"
  235. Remove file storing a keystore object\&.
  236. .PP
  237. \fBParameters:\fP
  238. .RS 4
  239. \fIkeystore\fP The key directories, the default profile\&.
  240. .br
  241. \fIpath\fP The relative name of the object be removed\&.
  242. .RE
  243. .PP
  244. \fBReturn values:\fP
  245. .RS 4
  246. \fITSS2_RC_SUCCESS\fP On success\&.
  247. .br
  248. \fITSS2_FAPI_RC_MEMORY\fP If memory could not be allocated\&.
  249. .br
  250. \fITSS2_FAPI_RC_IO_ERROR\fP If the file can't be removed\&.
  251. .br
  252. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if a FAPI object path was not found during authorization\&.
  253. .br
  254. \fITSS2_FAPI_RC_KEY_NOT_FOUND\fP if a key was not found\&.
  255. .br
  256. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  257. .br
  258. \fITSS2_FAPI_RC_NOT_PROVISIONED\fP FAPI was not provisioned\&.
  259. .br
  260. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  261. .br
  262. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  263. .RE
  264. .PP
  265. .SS "TSS2_RC ifapi_keystore_initialize (\fBIFAPI_KEYSTORE\fP * keystore, const char * config_systemdir, const char * config_userdir, const char * config_defaultprofile)"
  266. Store keystore parameters in the keystore context\&.
  267. .PP
  268. Also the user directory will be created if it does not exist\&.
  269. .PP
  270. \fBParameters:\fP
  271. .RS 4
  272. \fIkeystore\fP The keystore to be initialized\&.
  273. .br
  274. \fIconfig_systemdir\fP The configured system directory\&.
  275. .br
  276. \fIconfig_userdir\fP The configured user directory\&.
  277. .br
  278. \fIconfig_defaultprofile\fP The configured profile\&.
  279. .RE
  280. .PP
  281. \fBReturn values:\fP
  282. .RS 4
  283. \fITSS2_RC_SUCCESS\fP If the keystore can be initialized\&.
  284. .br
  285. \fITSS2_FAPI_RC_IO_ERROR\fP If the user part of the keystore can't be initialized\&.
  286. .br
  287. \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated\&.
  288. .br
  289. \fITSS2_FAPI_RC_BAD_PATH\fP if the home directory of the user cannot be determined\&.
  290. .br
  291. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  292. .RE
  293. .PP
  294. .SS "TSS2_RC ifapi_keystore_list_all (\fBIFAPI_KEYSTORE\fP * keystore, const char * searchpath, char *** results, size_t * numresults)"
  295. Create a list of of objects in a certain search path\&.
  296. .PP
  297. A vector of relative paths will be computed\&.
  298. .PP
  299. \fBParameters:\fP
  300. .RS 4
  301. \fIkeystore\fP The key directories, the default profile\&.
  302. .br
  303. \fIsearchpath\fP The relative search path in key store\&.
  304. .br
  305. \fIresults\fP The array with pointers to the relative object paths\&.
  306. .br
  307. \fInumresults\fP The number of found objects\&.
  308. .RE
  309. .PP
  310. \fBReturn values:\fP
  311. .RS 4
  312. \fITSS2_RC_SUCCESS\fP on success\&.
  313. .br
  314. \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated\&.
  315. .br
  316. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  317. .br
  318. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  319. .br
  320. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  321. .br
  322. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if a FAPI object path was not found during authorization\&.
  323. .RE
  324. .PP
  325. .SS "TSS2_RC ifapi_keystore_load_async (\fBIFAPI_KEYSTORE\fP * keystore, \fBIFAPI_IO\fP * io, const char * path)"
  326. Start loading FAPI object from key store\&.
  327. .PP
  328. Keys objects, NV objects, and hierarchies can be loaded\&.
  329. .PP
  330. \fBParameters:\fP
  331. .RS 4
  332. \fIkeystore\fP The key directories and default profile\&.
  333. .br
  334. \fIio\fP The input/output context being used for file I/O\&.
  335. .br
  336. \fIpath\fP The relative path of the object\&. For keys the path will expanded if possible\&.
  337. .RE
  338. .PP
  339. \fBReturn values:\fP
  340. .RS 4
  341. \fITSS2_RC_SUCCESS\fP If the object can be read\&.
  342. .br
  343. \fITSS2_FAPI_RC_IO_ERROR\fP if an I/O error was encountered\&.
  344. .br
  345. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if the file does not exist\&.
  346. .br
  347. \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated to hold the read data\&.
  348. .br
  349. \fITSS2_FAPI_RC_KEY_NOT_FOUND\fP if a key was not found\&.
  350. .br
  351. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  352. .br
  353. \fITSS2_FAPI_RC_NOT_PROVISIONED\fP FAPI was not provisioned\&.
  354. .br
  355. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  356. .br
  357. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  358. .RE
  359. .PP
  360. .SS "ifapi_keystore_object_does_not_exist (\fBIFAPI_KEYSTORE\fP * keystore, const char * path, const \fBIFAPI_OBJECT\fP * object)"
  361. Check whether the key path for a new object does not exist in key store\&.
  362. .PP
  363. To prevent overwriting of objects the functions returns an error if the object is already stored in key store\&. The FAPI path will be expanded to absolute path appropriate for the object to be checked\&.
  364. .PP
  365. \fBParameters:\fP
  366. .RS 4
  367. \fIkeystore\fP The key directories and default profile\&.
  368. .br
  369. \fIpath\fP The relative path of the object\&. For keys the path will expanded if possible\&.
  370. .br
  371. \fIobject\fP The object to be checked\&.
  372. .RE
  373. .PP
  374. \fBReturn values:\fP
  375. .RS 4
  376. \fITSS2_RC_SUCCESS\fP if the object does not exist and a new object can be written\&.
  377. .br
  378. \fITSS2_FAPI_RC_PATH_ALREADY_EXISTS\fP if the object exists in key store\&.
  379. .br
  380. \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated to hold the output data\&.
  381. .br
  382. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  383. .br
  384. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  385. .br
  386. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  387. .br
  388. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if a FAPI object path was not found during authorization\&.
  389. .RE
  390. .PP
  391. .SS "TSS2_RC ifapi_keystore_remove_directories (\fBIFAPI_KEYSTORE\fP * keystore, const char * dir_name)"
  392. Remove directories in keystore\&.
  393. .PP
  394. If the expanded directory exists in userdir and systemdir both will be deleted\&.
  395. .PP
  396. \fBParameters:\fP
  397. .RS 4
  398. \fIkeystore\fP The key directories, the default profile\&.
  399. .br
  400. \fIdir_name\fP The relative name of the directory to be removed\&.
  401. .RE
  402. .PP
  403. \fBReturn values:\fP
  404. .RS 4
  405. \fITSS2_RC_SUCCESS\fP on success\&.
  406. .br
  407. \fITSS2_FAPI_RC_MEMORY\fP If memory could not be allocated\&.
  408. .br
  409. \fITSS2_FAPI_RC_IO_ERROR\fP If directory can't be deleted\&.
  410. .br
  411. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  412. .br
  413. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  414. .br
  415. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  416. .br
  417. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if a FAPI object path was not found during authorization\&.
  418. .RE
  419. .PP
  420. .SS "TSS2_RC ifapi_keystore_search_nv_obj (\fBIFAPI_KEYSTORE\fP * keystore, \fBIFAPI_IO\fP * io, TPM2B_NV_PUBLIC * nv_public, char ** found_path)"
  421. Search nv object with a certain nv_index (from nv_public) in keystore\&.
  422. .PP
  423. \fBParameters:\fP
  424. .RS 4
  425. \fIkeystore\fP The key directories, the default profile, and the state information for the asynchronous search\&.
  426. .br
  427. \fIio\fP The input/output context being used for file I/O\&.
  428. .br
  429. \fInv_public\fP The public data of the searched nv object\&.
  430. .br
  431. \fIfound_path\fP The relative path of the found key\&.
  432. .RE
  433. .PP
  434. \fBReturn values:\fP
  435. .RS 4
  436. \fITSS2_RC_SUCCESS\fP on success\&.
  437. .br
  438. \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated\&.
  439. .br
  440. \fITSS2_FAPI_RC_KEY_NOT_FOUND\fP If the key was not found in keystore\&.
  441. .br
  442. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  443. .br
  444. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if a FAPI object path was not found during authorization\&.
  445. .br
  446. \fITSS2_FAPI_RC_TRY_AGAIN\fP if an I/O operation is not finished yet and this function needs to be called again\&.
  447. .br
  448. \fITSS2_FAPI_RC_BAD_SEQUENCE\fP if the context has an asynchronous operation already pending\&.
  449. .br
  450. \fITSS2_FAPI_RC_IO_ERROR\fP if an error occurred while accessing the object store\&.
  451. .br
  452. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  453. .br
  454. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  455. .br
  456. \fITSS2_FAPI_RC_PATH_ALREADY_EXISTS\fP if the object already exists in object store\&.
  457. .br
  458. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  459. .br
  460. \fITSS2_FAPI_RC_NOT_PROVISIONED\fP FAPI was not provisioned\&.
  461. .RE
  462. .PP
  463. .SS "TSS2_RC ifapi_keystore_search_obj (\fBIFAPI_KEYSTORE\fP * keystore, \fBIFAPI_IO\fP * io, TPM2B_NAME * name, char ** found_path)"
  464. Search object with a certain name in keystore\&.
  465. .PP
  466. \fBParameters:\fP
  467. .RS 4
  468. \fIkeystore\fP The key directories, the default profile, and the state information for the asynchronous search\&.
  469. .br
  470. \fIio\fP The input/output context being used for file I/O\&.
  471. .br
  472. \fIname\fP The name of the searched object\&.
  473. .br
  474. \fIfound_path\fP The relative path of the found key\&.
  475. .RE
  476. .PP
  477. \fBReturn values:\fP
  478. .RS 4
  479. \fITSS2_RC_SUCCESS\fP on success\&.
  480. .br
  481. \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated\&.
  482. .br
  483. \fITSS2_FAPI_RC_KEY_NOT_FOUND\fP If the key was not found in keystore\&.
  484. .br
  485. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if a FAPI object path was not found during authorization\&.
  486. .br
  487. \fITSS2_FAPI_RC_TRY_AGAIN\fP if an I/O operation is not finished yet and this function needs to be called again\&.
  488. .br
  489. \fITSS2_FAPI_RC_BAD_SEQUENCE\fP if the context has an asynchronous operation already pending\&.
  490. .br
  491. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  492. .br
  493. \fITSS2_FAPI_RC_IO_ERROR\fP if an error occurred while accessing the object store\&.
  494. .br
  495. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  496. .br
  497. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  498. .br
  499. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  500. .br
  501. \fITSS2_FAPI_RC_NOT_PROVISIONED\fP FAPI was not provisioned\&.
  502. .RE
  503. .PP
  504. .SS "TSS2_RC ifapi_keystore_store_async (\fBIFAPI_KEYSTORE\fP * keystore, \fBIFAPI_IO\fP * io, const char * path, const \fBIFAPI_OBJECT\fP * object)"
  505. Start writing FAPI object to the key store\&.
  506. .PP
  507. Keys objects, NV objects, and hierarchies can be written\&.
  508. .PP
  509. \fBParameters:\fP
  510. .RS 4
  511. \fIkeystore\fP The key directories and default profile\&.
  512. .br
  513. \fIio\fP The input/output context being used for file I/O\&.
  514. .br
  515. \fIpath\fP The relative path of the object\&. For keys the path will expanded if possible\&.
  516. .br
  517. \fIobject\fP The object to be written to the keystore\&.
  518. .RE
  519. .PP
  520. \fBReturn values:\fP
  521. .RS 4
  522. \fITSS2_RC_SUCCESS\fP if the object is written successfully\&.
  523. .br
  524. \fITSS2_FAPI_RC_IO_ERROR\fP if an I/O error was encountered;
  525. .br
  526. \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated to hold the output data\&.
  527. .br
  528. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  529. .br
  530. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  531. .br
  532. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  533. .br
  534. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  535. .br
  536. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if a FAPI object path was not found during authorization\&.
  537. .RE
  538. .PP
  539. .SH "Author"
  540. .PP
  541. Generated automatically by Doxygen for tpm2-tss from the source code\&.