EsysTestgroup.3 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092
  1. .TH "EsysTestgroup" 3 "Fri Oct 7 2022" "Version 3.2.0" "tpm2-tss" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. EsysTestgroup \- For every integration test a function with a name corresponding to the name of the source code file of the test is created: test_esys_<test_name>(ESYS_CONTEXT * esys_context)\&. This function is called by the standard function test_invoke_esapi in every integration test\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .in +1c
  10. .ti -1c
  11. .RI "int \fBtest_esys_evict_control_serialization\fP (\fBESYS_CONTEXT\fP *esys_context)"
  12. .br
  13. .ti -1c
  14. .RI "int \fBtest_esys_lock\fP (\fBESYS_CONTEXT\fP *esys_context)"
  15. .br
  16. .ti -1c
  17. .RI "int \fBtest_esys_get_capability\fP (\fBESYS_CONTEXT\fP *esys_context)"
  18. .br
  19. .ti -1c
  20. .RI "int \fBtest_esys_zgen_2phase\fP (\fBESYS_CONTEXT\fP *esys_context)"
  21. .br
  22. .ti -1c
  23. .RI "int \fBtest_esys_verify_signature\fP (\fBESYS_CONTEXT\fP *esys_context)"
  24. .br
  25. .ti -1c
  26. .RI "int \fBtest_esys_import\fP (\fBESYS_CONTEXT\fP *esys_context)"
  27. .br
  28. .ti -1c
  29. .RI "int \fBtest_esys_policy_regression\fP (\fBESYS_CONTEXT\fP *esys_context)"
  30. .br
  31. .ti -1c
  32. .RI "int \fBtest_esys_policy_authorize_nv_opt\fP (\fBESYS_CONTEXT\fP *esys_context)"
  33. .br
  34. .ti -1c
  35. .RI "int \fBtest_esys_policy_physical_presence_opt\fP (\fBESYS_CONTEXT\fP *esys_context)"
  36. .br
  37. .ti -1c
  38. .RI "int \fBtest_esys_policy_template_opt\fP (\fBESYS_CONTEXT\fP *esys_context)"
  39. .br
  40. .ti -1c
  41. .RI "int \fBtest_esys_policy_ticket\fP (\fBESYS_CONTEXT\fP *esys_context)"
  42. .br
  43. .ti -1c
  44. .RI "int \fBtest_esys_change_eps\fP (\fBESYS_CONTEXT\fP *esys_context)"
  45. .br
  46. .ti -1c
  47. .RI "int \fBtest_esys_policy_nv_undefine_special\fP (\fBESYS_CONTEXT\fP *esys_context)"
  48. .br
  49. .ti -1c
  50. .RI "int \fBtest_esys_create_fail\fP (\fBESYS_CONTEXT\fP *esys_context)"
  51. .br
  52. .ti -1c
  53. .RI "int \fBtest_esys_testparms\fP (\fBESYS_CONTEXT\fP *esys_context)"
  54. .br
  55. .ti -1c
  56. .RI "int \fBtest_esys_create_password_auth\fP (\fBESYS_CONTEXT\fP *esys_context)"
  57. .br
  58. .ti -1c
  59. .RI "int \fBtest_esys_stir_random\fP (\fBESYS_CONTEXT\fP *esys_context)"
  60. .br
  61. .ti -1c
  62. .RI "int \fBtest_esys_clockset\fP (\fBESYS_CONTEXT\fP *esys_context)"
  63. .br
  64. .ti -1c
  65. .RI "int \fBtest_esys_clear_control\fP (\fBESYS_CONTEXT\fP *esys_context)"
  66. .br
  67. .ti -1c
  68. .RI "int \fBtest_esys_nv_ram_extend_index\fP (\fBESYS_CONTEXT\fP *esys_context)"
  69. .br
  70. .ti -1c
  71. .RI "int \fBtest_esys_save_and_load_context\fP (\fBESYS_CONTEXT\fP *esys_context)"
  72. .br
  73. .ti -1c
  74. .RI "int \fBtest_esys_encrypt_decrypt\fP (\fBESYS_CONTEXT\fP *esys_context)"
  75. .br
  76. .ti -1c
  77. .RI "int \fBtest_esys_createloaded\fP (\fBESYS_CONTEXT\fP *esys_context)"
  78. .br
  79. .ti -1c
  80. .RI "int \fBtest_esys_audit\fP (\fBESYS_CONTEXT\fP *esys_context)"
  81. .br
  82. .ti -1c
  83. .RI "int \fBtest_esys_policy_password\fP (\fBESYS_CONTEXT\fP *esys_context)"
  84. .br
  85. .ti -1c
  86. .RI "int \fBtest_esys_tpm_tests\fP (\fBESYS_CONTEXT\fP *esys_context)"
  87. .br
  88. .ti -1c
  89. .RI "int \fBtest_esys_certify\fP (\fBESYS_CONTEXT\fP *esys_context)"
  90. .br
  91. .ti -1c
  92. .RI "int \fBtest_esys_pcr_basic\fP (\fBESYS_CONTEXT\fP *esys_context)"
  93. .br
  94. .ti -1c
  95. .RI "int \fBtest_esys_quote\fP (\fBESYS_CONTEXT\fP *esys_context)"
  96. .br
  97. .ti -1c
  98. .RI "int \fBtest_esys_tr_getName_hierarchy\fP (\fBESYS_CONTEXT\fP *ectx)"
  99. .br
  100. .ti -1c
  101. .RI "int \fBtest_esys_field_upgrade\fP (\fBESYS_CONTEXT\fP *esys_context)"
  102. .br
  103. .ti -1c
  104. .RI "int \fBtest_esys_unseal_password_auth\fP (\fBESYS_CONTEXT\fP *esys_context)"
  105. .br
  106. .ti -1c
  107. .RI "int \fBtest_esys_nv_ram_set_bits\fP (\fBESYS_CONTEXT\fP *esys_context)"
  108. .br
  109. .ti -1c
  110. .RI "int \fBtest_esys_nv_certify\fP (\fBESYS_CONTEXT\fP *esys_context)"
  111. .br
  112. .ti -1c
  113. .RI "int \fBtest_esys_ecdh_keygen\fP (\fBESYS_CONTEXT\fP *esys_context)"
  114. .br
  115. .ti -1c
  116. .RI "int \fBtest_esys_tr_fromTpmPublic_key\fP (\fBESYS_CONTEXT\fP *ectx)"
  117. .br
  118. .ti -1c
  119. .RI "int \fBtest_esys_ecdh_zgen\fP (\fBESYS_CONTEXT\fP *esys_context)"
  120. .br
  121. .ti -1c
  122. .RI "int \fBtest_esys_certify_creation\fP (\fBESYS_CONTEXT\fP *esys_context)"
  123. .br
  124. .ti -1c
  125. .RI "int \fBtest_esys_nv_ram_counter\fP (\fBESYS_CONTEXT\fP *esys_context)"
  126. .br
  127. .ti -1c
  128. .RI "int \fBtest_esys_event_sequence_complete\fP (\fBESYS_CONTEXT\fP *esys_context)"
  129. .br
  130. .ti -1c
  131. .RI "int \fBtest_esys_create_session_auth\fP (\fBESYS_CONTEXT\fP *esys_context)"
  132. .br
  133. .ti -1c
  134. .RI "int \fBtest_esys_tr_fromTpmPublic_nv\fP (\fBESYS_CONTEXT\fP *ectx)"
  135. .br
  136. .ti -1c
  137. .RI "int \fBtest_esys_create_primary_hmac\fP (\fBESYS_CONTEXT\fP *esys_context)"
  138. .br
  139. .ti -1c
  140. .RI "int \fBtest_esys_firmware_read\fP (\fBESYS_CONTEXT\fP *esys_context)"
  141. .br
  142. .ti -1c
  143. .RI "int \fBtest_esys_hmacsequencestart\fP (\fBESYS_CONTEXT\fP *esys_context)"
  144. .br
  145. .ti -1c
  146. .RI "int \fBtest_esys_hmac\fP (\fBESYS_CONTEXT\fP *esys_context)"
  147. .br
  148. .ti -1c
  149. .RI "int \fBtest_esys_ecc_parameters\fP (\fBESYS_CONTEXT\fP *esys_context)"
  150. .br
  151. .ti -1c
  152. .RI "int \fBtest_esys_hierarchychangeauth\fP (\fBESYS_CONTEXT\fP *esys_context)"
  153. .br
  154. .ti -1c
  155. .RI "int \fBtest_esys_pcr_auth_value\fP (\fBESYS_CONTEXT\fP *esys_context)"
  156. .br
  157. .ti -1c
  158. .RI "int \fBtest_esys_nv_ram_ordinary_index\fP (\fBESYS_CONTEXT\fP *esys_context)"
  159. .br
  160. .ti -1c
  161. .RI "int \fBtest_esys_duplicate\fP (\fBESYS_CONTEXT\fP *esys_context)"
  162. .br
  163. .ti -1c
  164. .RI "int \fBtest_esys_rsa_encrypt_decrypt\fP (\fBESYS_CONTEXT\fP *esys_context)"
  165. .br
  166. .ti -1c
  167. .RI "int \fBtest_esys_set_algorithm_set\fP (\fBESYS_CONTEXT\fP *esys_context)"
  168. .br
  169. .ti -1c
  170. .RI "int \fBtest_esys_object_changeauth\fP (\fBESYS_CONTEXT\fP *esys_context)"
  171. .br
  172. .ti -1c
  173. .RI "int \fBtest_esys_pp_commands\fP (\fBESYS_CONTEXT\fP *esys_context)"
  174. .br
  175. .ti -1c
  176. .RI "int \fBtest_esys_clear\fP (\fBESYS_CONTEXT\fP *esys_context)"
  177. .br
  178. .ti -1c
  179. .RI "int \fBtest_esys_policy_authorize\fP (\fBESYS_CONTEXT\fP *esys_context)"
  180. .br
  181. .ti -1c
  182. .RI "int \fBtest_esys_get_time\fP (\fBESYS_CONTEXT\fP *esys_context)"
  183. .br
  184. .ti -1c
  185. .RI "int \fBtest_esys_make_credential\fP (\fBESYS_CONTEXT\fP *esys_context)"
  186. .br
  187. .ti -1c
  188. .RI "int \fBtest_esys_commit\fP (\fBESYS_CONTEXT\fP *esys_context)"
  189. .br
  190. .ti -1c
  191. .RI "int \fBtest_esys_policy_nv_changeauth\fP (\fBESYS_CONTEXT\fP *esys_context)"
  192. .br
  193. .in -1c
  194. .SH "Detailed Description"
  195. .PP
  196. For every integration test a function with a name corresponding to the name of the source code file of the test is created: test_esys_<test_name>(ESYS_CONTEXT * esys_context)\&. This function is called by the standard function test_invoke_esapi in every integration test\&.
  197. For some tests different test cases can be created with compiler defines to avoid duplicate code in different test cases\&.The following defines are used and listed in the function's documentation if used:
  198. .IP "\(bu" 2
  199. TEST_ECC Create an ECC key instead of an RSA key\&.
  200. .IP "\(bu" 2
  201. TEST_SESSION Use session authentication instead of password authentication\&.
  202. .IP "\(bu" 2
  203. TEST_READ_LOCK Activate test of Esys_NV_ReadLock\&.
  204. .IP "\(bu" 2
  205. TEST_WRITE_LOCK Activate test of Esys_NV_WriteLock\&.
  206. .IP "\(bu" 2
  207. TEST_XOR_OBFUSCATION Use xor obfuscation for parameter encryption\&.
  208. .IP "\(bu" 2
  209. TEST_AES_ENCRYPTION Use AES for parameter encryption\&.
  210. .IP "\(bu" 2
  211. TEST_BOUND_SESSION Run test with a bound session\&.
  212. .PP
  213. .PP
  214. The ESAPI command calls which are used in a test are listed in the function's documentation and are marked according to the PC Client Profile Revision 01\&.03 v22:
  215. .IP "\(bu" 2
  216. (M) Mandatory
  217. .IP "\(bu" 2
  218. (O) Optional
  219. .IP "\(bu" 2
  220. (F) Commands added after TPM Specification Rev\&. 1\&.16 is integrated\&.
  221. .PP
  222. .SH "Function Documentation"
  223. .PP
  224. .SS "test_esys_audit (\fBESYS_CONTEXT\fP * esys_context)"
  225. This test is intended to test the ESYS audit commands\&.
  226. .PP
  227. First a key for signing the audit digest is computed\&. A audit session is started, and for the command GetCapability the command audit digest and the session audit digest is computed\&. (Esys_GetCommandAuditDigest, Esys_GetSessionAuditDigest)\&. In the last test the audit hash alg is changed with Esys_SetCommandCodeAuditStatus\&.
  228. .PP
  229. \fBNote:\fP platform authorization needed\&.
  230. .PP
  231. Tested ESYS commands:
  232. .IP "\(bu" 2
  233. \fBEsys_CreatePrimary()\fP (M)
  234. .IP "\(bu" 2
  235. \fBEsys_FlushContext()\fP (M)
  236. .IP "\(bu" 2
  237. \fBEsys_GetCapability()\fP (M)
  238. .IP "\(bu" 2
  239. \fBEsys_GetCommandAuditDigest()\fP (O)
  240. .IP "\(bu" 2
  241. \fBEsys_GetSessionAuditDigest()\fP (M)
  242. .IP "\(bu" 2
  243. \fBEsys_SetCommandCodeAuditStatus()\fP (O)
  244. .IP "\(bu" 2
  245. \fBEsys_StartAuthSession()\fP (M)
  246. .IP "\(bu" 2
  247. \fBEsys_StartAuthSession()\fP (M)
  248. .PP
  249. .PP
  250. \fBParameters:\fP
  251. .RS 4
  252. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  253. .RE
  254. .PP
  255. \fBReturn values:\fP
  256. .RS 4
  257. \fIEXIT_FAILURE\fP
  258. .br
  259. \fIEXIT_SKIP\fP
  260. .br
  261. \fIEXIT_SUCCESS\fP
  262. .RE
  263. .PP
  264. .SS "test_esys_certify (\fBESYS_CONTEXT\fP * esys_context)"
  265. This test is intended to test the command Esys_Certify\&.
  266. .PP
  267. We create a RSA primary signing key which will be used as signing key and as object for the certify command\&.
  268. .PP
  269. Tested ESYS commands:
  270. .IP "\(bu" 2
  271. \fBEsys_Certify()\fP (M)
  272. .IP "\(bu" 2
  273. \fBEsys_CreatePrimary()\fP (M)
  274. .IP "\(bu" 2
  275. \fBEsys_FlushContext()\fP (M)
  276. .PP
  277. .PP
  278. \fBParameters:\fP
  279. .RS 4
  280. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  281. .RE
  282. .PP
  283. \fBReturn values:\fP
  284. .RS 4
  285. \fIEXIT_FAILURE\fP
  286. .br
  287. \fIEXIT_SUCCESS\fP
  288. .RE
  289. .PP
  290. .SS "test_esys_certify_creation (\fBESYS_CONTEXT\fP * esys_context)"
  291. This test is intended to test the command Esys_CertifyCreation\&.
  292. .PP
  293. We create a RSA primary signing key which will be used as signing key and as object for the certify creation\&.
  294. .PP
  295. Tested ESYS commands:
  296. .IP "\(bu" 2
  297. \fBEsys_CertifyCreation()\fP (M)
  298. .IP "\(bu" 2
  299. \fBEsys_CreatePrimary()\fP (M)
  300. .IP "\(bu" 2
  301. \fBEsys_FlushContext()\fP (M)
  302. .PP
  303. .PP
  304. \fBParameters:\fP
  305. .RS 4
  306. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  307. .RE
  308. .PP
  309. \fBReturn values:\fP
  310. .RS 4
  311. \fIEXIT_FAILURE\fP
  312. .br
  313. \fIEXIT_SUCCESS\fP
  314. .RE
  315. .PP
  316. .SS "test_esys_change_eps (\fBESYS_CONTEXT\fP * esys_context)"
  317. Test the ESYS function Esys_ChangeEPS\&.
  318. .PP
  319. \fBNote:\fP platform authorization needed\&.
  320. .PP
  321. Tested ESYS commands:
  322. .IP "\(bu" 2
  323. \fBEsys_ChangeEPS()\fP (O)
  324. .PP
  325. .PP
  326. \fBParameters:\fP
  327. .RS 4
  328. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  329. .RE
  330. .PP
  331. \fBReturn values:\fP
  332. .RS 4
  333. \fIEXIT_FAILURE\fP
  334. .br
  335. \fIEXIT_SKIP\fP
  336. .br
  337. \fIEXIT_SUCCESS\fP
  338. .RE
  339. .PP
  340. .SS "test_esys_clear (\fBESYS_CONTEXT\fP * esys_context)"
  341. Test of the ESYS function Esys_Clear\&.
  342. .PP
  343. Tested ESYS commands:
  344. .IP "\(bu" 2
  345. \fBEsys_Clear()\fP (M)
  346. .IP "\(bu" 2
  347. \fBEsys_FlushContext()\fP (M)
  348. .IP "\(bu" 2
  349. \fBEsys_StartAuthSession()\fP (M)
  350. .PP
  351. .PP
  352. Used compiler defines: TEST_SESSION
  353. .PP
  354. \fBParameters:\fP
  355. .RS 4
  356. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  357. .RE
  358. .PP
  359. \fBReturn values:\fP
  360. .RS 4
  361. \fIEXIT_FAILURE\fP
  362. .br
  363. \fIEXIT_SUCCESS\fP
  364. .RE
  365. .PP
  366. .SS "test_esys_clear_control (\fBESYS_CONTEXT\fP * esys_context)"
  367. Test the ESYS function Esys_ClearControl\&.
  368. .PP
  369. The clear command will be disabled and with Esys_Clear it will be checked whether clear is disabled\&.
  370. .PP
  371. Tested ESYS commands:
  372. .IP "\(bu" 2
  373. \fBEsys_Clear()\fP (M)
  374. .IP "\(bu" 2
  375. \fBEsys_ClearControl()\fP (M)
  376. .PP
  377. .PP
  378. *\fBNote:\fP platform authorization needed\&.
  379. .PP
  380. \fBParameters:\fP
  381. .RS 4
  382. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  383. .RE
  384. .PP
  385. \fBReturn values:\fP
  386. .RS 4
  387. \fIEXIT_FAILURE\fP
  388. .br
  389. \fIEXIT_SUCCESS\fP
  390. .RE
  391. .PP
  392. .SS "test_esys_clockset (\fBESYS_CONTEXT\fP * esys_context)"
  393. Test the ESYS function Esys_ClockSet and Esys_ReadClock\&.
  394. .PP
  395. \fBNote:\fP platform authorization needed\&.
  396. .PP
  397. Tested ESYS commands:
  398. .IP "\(bu" 2
  399. \fBEsys_ClockRateAdjust()\fP (M)
  400. .IP "\(bu" 2
  401. \fBEsys_ClockSet()\fP (M)
  402. .IP "\(bu" 2
  403. \fBEsys_ReadClock()\fP (M)
  404. .PP
  405. .PP
  406. Used compiler defines: TEST_SESSION
  407. .PP
  408. \fBParameters:\fP
  409. .RS 4
  410. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  411. .RE
  412. .PP
  413. \fBReturn values:\fP
  414. .RS 4
  415. \fIEXIT_FAILURE\fP
  416. .br
  417. \fIEXIT_SKIP\fP
  418. .br
  419. \fIEXIT_SUCCESS\fP
  420. .RE
  421. .PP
  422. .SS "test_esys_commit (\fBESYS_CONTEXT\fP * esys_context)"
  423. This test is intended to test Esys_Commit\&. based on an ECC key created with Esys_CreatePrimary Esys_Commit is called with a point from the primary key\&.
  424. .PP
  425. Tested ESYS commands:
  426. .IP "\(bu" 2
  427. \fBEsys_Commit()\fP (M)
  428. .IP "\(bu" 2
  429. \fBEsys_CreatePrimary()\fP (M)
  430. .IP "\(bu" 2
  431. \fBEsys_FlushContext()\fP (M)
  432. .IP "\(bu" 2
  433. \fBEsys_StartAuthSession()\fP (M)
  434. .PP
  435. .PP
  436. \fBParameters:\fP
  437. .RS 4
  438. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  439. .RE
  440. .PP
  441. \fBReturn values:\fP
  442. .RS 4
  443. \fIEXIT_FAILURE\fP
  444. .br
  445. \fIEXIT_SKIP\fP
  446. .br
  447. \fIEXIT_SUCCESS\fP
  448. .RE
  449. .PP
  450. .SS "test_esys_create_fail (\fBESYS_CONTEXT\fP * esys_context)"
  451. This test is intended to test password authentication\&.
  452. .PP
  453. We start by creating a primary key (Esys_CreatePrimary)\&. Based in the primary several calls with NULL parameters, which should not be allowed, will be tested\&.
  454. .PP
  455. Tested ESYS commands:
  456. .IP "\(bu" 2
  457. \fBEsys_Create()\fP (M)
  458. .IP "\(bu" 2
  459. \fBEsys_CreatePrimary()\fP (M)
  460. .IP "\(bu" 2
  461. \fBEsys_FlushContext()\fP (M)
  462. .PP
  463. .PP
  464. Used compiler defines: TEST_ECC
  465. .PP
  466. \fBParameters:\fP
  467. .RS 4
  468. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  469. .RE
  470. .PP
  471. \fBReturn values:\fP
  472. .RS 4
  473. \fIEXIT_FAILURE\fP
  474. .br
  475. \fIEXIT_SUCCESS\fP
  476. .RE
  477. .PP
  478. .SS "test_esys_create_password_auth (\fBESYS_CONTEXT\fP * esys_context)"
  479. This test is intended to test password authentication for the ESYS command Create\&.
  480. .PP
  481. We start by creating a primary key (Esys_CreatePrimary)\&. Based in the primary a second key with an password define in the sensitive area will be created\&. This key will be loaded and will be used as parent to create a third key\&. Password authentication will be used to create this key\&.
  482. .PP
  483. Tested ESYS commands:
  484. .IP "\(bu" 2
  485. \fBEsys_Create()\fP (M)
  486. .IP "\(bu" 2
  487. \fBEsys_CreatePrimary()\fP (M)
  488. .IP "\(bu" 2
  489. \fBEsys_FlushContext()\fP (M)
  490. .IP "\(bu" 2
  491. \fBEsys_Load()\fP (M)
  492. .PP
  493. .PP
  494. Used compiler defines: TEST_ECC
  495. .PP
  496. \fBParameters:\fP
  497. .RS 4
  498. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  499. .RE
  500. .PP
  501. \fBReturn values:\fP
  502. .RS 4
  503. \fIEXIT_FAILURE\fP
  504. .br
  505. \fIEXIT_SUCCESS\fP
  506. .RE
  507. .PP
  508. .SS "test_esys_create_primary_hmac (\fBESYS_CONTEXT\fP * esys_context)"
  509. This test is intended to test Esys_CreatePrimary with hmac verification\&.
  510. .PP
  511. The test can be executed with RSA or ECC keys\&. ECC will be used if ECC is defined\&.
  512. .PP
  513. Tested ESYS commands:
  514. .IP "\(bu" 2
  515. \fBEsys_CreatePrimary()\fP (M)
  516. .IP "\(bu" 2
  517. \fBEsys_FlushContext()\fP (M)
  518. .IP "\(bu" 2
  519. \fBEsys_StartAuthSession()\fP (M)
  520. .PP
  521. .PP
  522. Used compiler defines: TEST_ECC
  523. .PP
  524. \fBParameters:\fP
  525. .RS 4
  526. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  527. .RE
  528. .PP
  529. \fBReturn values:\fP
  530. .RS 4
  531. \fIEXIT_FAILURE\fP
  532. .br
  533. \fIEXIT_SUCCESS\fP
  534. .RE
  535. .PP
  536. .SS "test_esys_create_session_auth (\fBESYS_CONTEXT\fP * esys_context)"
  537. This test is intended to test parameter encryption/decryption, session management, hmac computation, and session key generation\&.
  538. .PP
  539. We start by creating a primary key (Esys_CreatePrimary)\&. The primary key will be used as tpmKey for Esys_StartAuthSession\&. Parameter encryption and decryption will be activated for the session\&. The session will be used to Create a second key by Eys_Create (with password) This key will be Loaded to and a third key will be created with the second key as parent key (Esys_Create)\&. The type of encryptin can be selected by the compiler variables (-D option): TEST_XOR_OBFUSCATION or TEST_AES_ENCRYPTION\&. Secret exchange with a ECC key can be activated with the compiler variable -D TEST_ECC\&.
  540. .PP
  541. Tested ESYS commands:
  542. .IP "\(bu" 2
  543. \fBEsys_ContextLoad()\fP (M)
  544. .IP "\(bu" 2
  545. \fBEsys_ContextSave()\fP (M)
  546. .IP "\(bu" 2
  547. \fBEsys_Create()\fP (M)
  548. .IP "\(bu" 2
  549. \fBEsys_CreatePrimary()\fP (M)
  550. .IP "\(bu" 2
  551. \fBEsys_FlushContext()\fP (M)
  552. .IP "\(bu" 2
  553. \fBEsys_Load()\fP (M)
  554. .IP "\(bu" 2
  555. \fBEsys_StartAuthSession()\fP (M)
  556. .PP
  557. .PP
  558. Used compiler defines: TEST_ECC, TEST_AES_ENCRYPTION, TEST_BOUND_SESSION TEST_XOR_OBFUSCATION
  559. .PP
  560. \fBParameters:\fP
  561. .RS 4
  562. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  563. .RE
  564. .PP
  565. \fBReturn values:\fP
  566. .RS 4
  567. \fIEXIT_FAILURE\fP
  568. .br
  569. \fIEXIT_SUCCESS\fP
  570. .RE
  571. .PP
  572. .SS "test_esys_createloaded (\fBESYS_CONTEXT\fP * esys_context)"
  573. This test is intended to test the ESYS command CreateLoaded\&.
  574. .PP
  575. We start by creating a primary key (Esys_CreatePrimary)\&. This primary key will be used as parent key for CreateLoaded\&.
  576. .PP
  577. Tested ESYS commands:
  578. .IP "\(bu" 2
  579. Esys_CreateLoaded() (F)
  580. .IP "\(bu" 2
  581. \fBEsys_CreatePrimary()\fP (M)
  582. .IP "\(bu" 2
  583. \fBEsys_FlushContext()\fP (M)
  584. .IP "\(bu" 2
  585. \fBEsys_StartAuthSession()\fP (M)
  586. .IP "\(bu" 2
  587. \fBEsys_TR_GetName()\fP (M)
  588. .IP "\(bu" 2
  589. Esys_TR_ReadPublic() (M)
  590. .PP
  591. .PP
  592. Used compiler defines: TEST_SESSION
  593. .PP
  594. \fBParameters:\fP
  595. .RS 4
  596. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  597. .RE
  598. .PP
  599. \fBReturn values:\fP
  600. .RS 4
  601. \fIEXIT_FAILURE\fP
  602. .br
  603. \fIEXIT_SKIP\fP
  604. .br
  605. \fIEXIT_SUCCESS\fP
  606. .RE
  607. .PP
  608. .SS "test_esys_duplicate (\fBESYS_CONTEXT\fP * esys_context)"
  609. This test is intended to test the ESYS commands Duplicate and Rewrap\&.
  610. .PP
  611. We start by creating a primary key (Esys_CreatePrimary)\&. This primary key will be used as parent key for the Duplicate command\&. A second primary key will be the parent key of the duplicated key\&. In the last step the key is rewrapped with the first primary key as parent key\&.
  612. .PP
  613. Tested ESYS commands:
  614. .IP "\(bu" 2
  615. \fBEsys_Create()\fP (M)
  616. .IP "\(bu" 2
  617. \fBEsys_CreatePrimary()\fP (M)
  618. .IP "\(bu" 2
  619. \fBEsys_Duplicate()\fP (M)
  620. .IP "\(bu" 2
  621. \fBEsys_FlushContext()\fP (M)
  622. .IP "\(bu" 2
  623. \fBEsys_Load()\fP (M)
  624. .IP "\(bu" 2
  625. \fBEsys_PolicyAuthValue()\fP (M)
  626. .IP "\(bu" 2
  627. \fBEsys_PolicyCommandCode()\fP (M)
  628. .IP "\(bu" 2
  629. \fBEsys_PolicyGetDigest()\fP (M)
  630. .IP "\(bu" 2
  631. \fBEsys_ReadPublic()\fP (M)
  632. .IP "\(bu" 2
  633. \fBEsys_Rewrap()\fP (O)
  634. .IP "\(bu" 2
  635. \fBEsys_StartAuthSession()\fP (M)
  636. .PP
  637. .PP
  638. \fBParameters:\fP
  639. .RS 4
  640. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  641. .RE
  642. .PP
  643. \fBReturn values:\fP
  644. .RS 4
  645. \fIEXIT_FAILURE\fP
  646. .br
  647. \fIEXIT_SKIP\fP
  648. .br
  649. \fIEXIT_SUCCESS\fP
  650. .RE
  651. .PP
  652. .SS "test_esys_ecc_parameters (\fBESYS_CONTEXT\fP * esys_context)"
  653. Test the ESYS function Esys_ECC_Parameters\&.
  654. .PP
  655. Tested ESYS commands:
  656. .IP "\(bu" 2
  657. \fBEsys_ECC_Parameters()\fP (M)
  658. .PP
  659. .PP
  660. \fBParameters:\fP
  661. .RS 4
  662. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  663. .RE
  664. .PP
  665. \fBReturn values:\fP
  666. .RS 4
  667. \fIEXIT_FAILURE\fP
  668. .br
  669. \fIEXIT_SKIP\fP
  670. .br
  671. \fIEXIT_SUCCESS\fP
  672. .RE
  673. .PP
  674. .SS "test_esys_ecdh_keygen (\fBESYS_CONTEXT\fP * esys_context)"
  675. This test is intended to test Esys_ECDH_KeyGen based on an ECC key created with Esys_CreatePrimary\&.
  676. .PP
  677. Tested ESYS commands:
  678. .IP "\(bu" 2
  679. \fBEsys_CreatePrimary()\fP (M)
  680. .IP "\(bu" 2
  681. \fBEsys_ECDH_KeyGen()\fP (M)
  682. .IP "\(bu" 2
  683. \fBEsys_FlushContext()\fP (M)
  684. .IP "\(bu" 2
  685. \fBEsys_StartAuthSession()\fP (M)
  686. .PP
  687. .PP
  688. \fBParameters:\fP
  689. .RS 4
  690. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  691. .RE
  692. .PP
  693. \fBReturn values:\fP
  694. .RS 4
  695. \fIEXIT_FAILURE\fP
  696. .br
  697. \fIEXIT_SUCCESS\fP
  698. .RE
  699. .PP
  700. .SS "test_esys_ecdh_zgen (\fBESYS_CONTEXT\fP * esys_context)"
  701. This test is intended to test Esys_ECDH_ZGen\&. based on an ECC key created with Esys_CreatePrimary and a dummy ECC point\&.
  702. .PP
  703. Tested ESYS commands:
  704. .IP "\(bu" 2
  705. \fBEsys_CreatePrimary()\fP (M)
  706. .IP "\(bu" 2
  707. \fBEsys_ECDH_ZGen()\fP (M)
  708. .IP "\(bu" 2
  709. \fBEsys_FlushContext()\fP (M)
  710. .IP "\(bu" 2
  711. \fBEsys_StartAuthSession()\fP (M)
  712. .PP
  713. .PP
  714. \fBParameters:\fP
  715. .RS 4
  716. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  717. .RE
  718. .PP
  719. \fBReturn values:\fP
  720. .RS 4
  721. \fIEXIT_FAILURE\fP
  722. .br
  723. \fIEXIT_SUCCESS\fP
  724. .RE
  725. .PP
  726. .SS "test_esys_encrypt_decrypt (\fBESYS_CONTEXT\fP * esys_context)"
  727. This test is intended to test the ESYS function Esys_EncryptDecrypt\&.
  728. .PP
  729. First a primary key is generated\&. This key will be uses as parent fo a symmetric key, which will be used to encrypt and decrypt a tpm2b\&. The result will be compared\&.
  730. .PP
  731. Tested ESYS commands:
  732. .IP "\(bu" 2
  733. \fBEsys_Create()\fP (M)
  734. .IP "\(bu" 2
  735. \fBEsys_CreatePrimary()\fP (M)
  736. .IP "\(bu" 2
  737. \fBEsys_EncryptDecrypt()\fP (O)
  738. .IP "\(bu" 2
  739. \fBEsys_FlushContext()\fP (M)
  740. .IP "\(bu" 2
  741. \fBEsys_Load()\fP (M)
  742. .PP
  743. .PP
  744. \fBParameters:\fP
  745. .RS 4
  746. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  747. .RE
  748. .PP
  749. \fBReturn values:\fP
  750. .RS 4
  751. \fIEXIT_FAILURE\fP
  752. .br
  753. \fIEXIT_SKIP\fP
  754. .br
  755. \fIEXIT_SUCCESS\fP
  756. .RE
  757. .PP
  758. .SS "test_esys_event_sequence_complete (\fBESYS_CONTEXT\fP * esys_context)"
  759. Test the ESYS commands HashSequenceStart, SequenceUpdate, and EventSequenceComplete\&.
  760. .PP
  761. Tested ESYS commands:
  762. .IP "\(bu" 2
  763. \fBEsys_EventSequenceComplete()\fP (M)
  764. .IP "\(bu" 2
  765. \fBEsys_HashSequenceStart()\fP (M)
  766. .IP "\(bu" 2
  767. \fBEsys_SequenceUpdate()\fP (M)
  768. .PP
  769. .PP
  770. \fBParameters:\fP
  771. .RS 4
  772. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  773. .RE
  774. .PP
  775. \fBReturn values:\fP
  776. .RS 4
  777. \fIEXIT_FAILURE\fP
  778. .br
  779. \fIEXIT_SUCCESS\fP
  780. .RE
  781. .PP
  782. < enforce event Sequence
  783. .SS "test_esys_evict_control_serialization (\fBESYS_CONTEXT\fP * esys_context)"
  784. This test is intended to test EvictControl and ESYS Serialization\&.
  785. .PP
  786. We start by creating a primary key (Esys_CreatePrimary)\&. Based on this key a persistent object is created (Esys_EvictControl)\&. The resource of this object will be serialized and deserialized with the corresponding ESYS functions (Esys_TR_Serialize, Esys_TR_Deserialize)\&. To check whether the deserialization was successful a new object will be created with the handle returned by the deserialize function\&.
  787. .PP
  788. Tested ESYS commands:
  789. .IP "\(bu" 2
  790. \fBEsys_Create()\fP (M)
  791. .IP "\(bu" 2
  792. \fBEsys_CreatePrimary()\fP (M)
  793. .IP "\(bu" 2
  794. \fBEsys_EvictControl()\fP (M)
  795. .IP "\(bu" 2
  796. \fBEsys_FlushContext()\fP (M)
  797. .PP
  798. .PP
  799. \fBParameters:\fP
  800. .RS 4
  801. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  802. .RE
  803. .PP
  804. \fBReturn values:\fP
  805. .RS 4
  806. \fIEXIT_FAILURE\fP
  807. .br
  808. \fIEXIT_SUCCESS\fP
  809. .RE
  810. .PP
  811. .SS "test_esys_field_upgrade (\fBESYS_CONTEXT\fP * esys_context)"
  812. Test the ESYS function Esys_FieldUpgradeStart and Esys_FieldUpgradeData\&.
  813. .PP
  814. Tested ESYS commands:
  815. .IP "\(bu" 2
  816. Esys_FieldUpgradeData() (O)
  817. .IP "\(bu" 2
  818. Esys_FieldUpgradeStart() (O)
  819. .PP
  820. .PP
  821. \fBParameters:\fP
  822. .RS 4
  823. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  824. .RE
  825. .PP
  826. \fBReturn values:\fP
  827. .RS 4
  828. \fIEXIT_FAILURE\fP
  829. .br
  830. \fIEXIT_SKIP\fP
  831. .br
  832. \fIEXIT_SUCCESS\fP
  833. .RE
  834. .PP
  835. .SS "test_esys_firmware_read (\fBESYS_CONTEXT\fP * esys_context)"
  836. Test the ESYS function Esys_FirmwareRead\&.
  837. .PP
  838. Tested ESYS commands:
  839. .IP "\(bu" 2
  840. Esys_FirmwareRead() (O)
  841. .PP
  842. .PP
  843. \fBParameters:\fP
  844. .RS 4
  845. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  846. .RE
  847. .PP
  848. \fBReturn values:\fP
  849. .RS 4
  850. \fIEXIT_FAILURE\fP
  851. .br
  852. \fIEXIT_SKIP\fP
  853. .br
  854. \fIEXIT_SUCCESS\fP
  855. .RE
  856. .PP
  857. .SS "test_esys_get_capability (\fBESYS_CONTEXT\fP * esys_context)"
  858. This test is intended to test the ESYS get capability command\&.
  859. .PP
  860. Tested ESYS commands:
  861. .IP "\(bu" 2
  862. \fBEsys_GetCapability()\fP (M)
  863. .PP
  864. .PP
  865. \fBParameters:\fP
  866. .RS 4
  867. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  868. .RE
  869. .PP
  870. \fBReturn values:\fP
  871. .RS 4
  872. \fIEXIT_FAILURE\fP
  873. .br
  874. \fIEXIT_SUCCESS\fP
  875. .RE
  876. .PP
  877. .SS "test_esys_get_time (\fBESYS_CONTEXT\fP * esys_context)"
  878. This test is intended to test the GetTime command with password authentication\&.
  879. .PP
  880. We create a RSA primary signing key which will be used for signing\&.
  881. .PP
  882. Tested ESYS commands:
  883. .IP "\(bu" 2
  884. \fBEsys_CreatePrimary()\fP (M)
  885. .IP "\(bu" 2
  886. \fBEsys_FlushContext()\fP (M)
  887. .IP "\(bu" 2
  888. \fBEsys_GetTime()\fP (O)
  889. .PP
  890. .PP
  891. \fBParameters:\fP
  892. .RS 4
  893. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  894. .RE
  895. .PP
  896. \fBReturn values:\fP
  897. .RS 4
  898. \fIEXIT_FAILURE\fP
  899. .br
  900. \fIEXIT_SKIP\fP
  901. .br
  902. \fIEXIT_SUCCESS\fP
  903. .RE
  904. .PP
  905. .SS "test_esys_hierarchychangeauth (\fBESYS_CONTEXT\fP * esys_context)"
  906. This test is intended to test the change of an authorization value of a hierarchy\&.
  907. .PP
  908. To check whether the change was successful a primary key is created with the handle of this hierarchy and the new authorization\&. Also second primary is created after a call of Esys_TR_SetAuth with the new auth value\&.
  909. .PP
  910. Tested ESYS commands:
  911. .IP "\(bu" 2
  912. \fBEsys_CreatePrimary()\fP (M)
  913. .IP "\(bu" 2
  914. \fBEsys_FlushContext()\fP (M)
  915. .IP "\(bu" 2
  916. \fBEsys_HierarchyChangeAuth()\fP (M)
  917. .PP
  918. .PP
  919. \fBParameters:\fP
  920. .RS 4
  921. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  922. .RE
  923. .PP
  924. \fBReturn values:\fP
  925. .RS 4
  926. \fIEXIT_FAILURE\fP
  927. .br
  928. \fIEXIT_SUCCESS\fP
  929. .RE
  930. .PP
  931. .SS "test_esys_hmac (\fBESYS_CONTEXT\fP * esys_context)"
  932. This test is intended to test the ESYS command Esys_HMAC with password authentication\&.
  933. .PP
  934. We create a symmetric HMAC key signing key which will be used for signing\&. This key will be used to create the HMAC for a test buffer\&.
  935. .PP
  936. Tested ESYS commands:
  937. .IP "\(bu" 2
  938. \fBEsys_CreatePrimary()\fP (M)
  939. .IP "\(bu" 2
  940. \fBEsys_FlushContext()\fP (M)
  941. .IP "\(bu" 2
  942. \fBEsys_HMAC()\fP (O)
  943. .PP
  944. .PP
  945. \fBParameters:\fP
  946. .RS 4
  947. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  948. .RE
  949. .PP
  950. \fBReturn values:\fP
  951. .RS 4
  952. \fIEXIT_FAILURE\fP
  953. .br
  954. \fIEXIT_SUCCESS\fP
  955. .RE
  956. .PP
  957. .SS "test_esys_hmacsequencestart (\fBESYS_CONTEXT\fP * esys_context)"
  958. Test the ESYS commands: HMAC_Start, SequenceUpdate, and SequenceComplete\&.
  959. .PP
  960. The HMAC key is created by using Esys_CreatePrimary\&.
  961. .PP
  962. Tested ESYS commands:
  963. .IP "\(bu" 2
  964. \fBEsys_CreatePrimary()\fP (M)
  965. .IP "\(bu" 2
  966. \fBEsys_FlushContext()\fP (M)
  967. .IP "\(bu" 2
  968. \fBEsys_HMAC_Start()\fP (M)
  969. .IP "\(bu" 2
  970. Esys_SequenceComplete() (M)
  971. .IP "\(bu" 2
  972. \fBEsys_SequenceUpdate()\fP (M)
  973. .IP "\(bu" 2
  974. \fBEsys_StartAuthSession()\fP (M)
  975. .PP
  976. .PP
  977. Used compiler defines: TEST_SESSION
  978. .PP
  979. \fBParameters:\fP
  980. .RS 4
  981. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  982. .RE
  983. .PP
  984. \fBReturn values:\fP
  985. .RS 4
  986. \fIEXIT_FAILURE\fP
  987. .br
  988. \fIEXIT_SUCCESS\fP
  989. .RE
  990. .PP
  991. .SS "test_esys_import (\fBESYS_CONTEXT\fP * esys_context)"
  992. This test is intended to test the ESYS commands Duplicate and Import\&.
  993. .PP
  994. We start by creating a primary key (Esys_CreatePrimary)\&. This primary key will be used as parent key for the Duplicate command\&. A second primary key will be the parent key of the duplicated key\&. In the last step the key is imported with the first primary key as parent key (Esys_Import)\&.
  995. .PP
  996. Tested ESYS commands:
  997. .IP "\(bu" 2
  998. \fBEsys_Create()\fP (M)
  999. .IP "\(bu" 2
  1000. \fBEsys_CreatePrimary()\fP (M)
  1001. .IP "\(bu" 2
  1002. \fBEsys_Duplicate()\fP (M)
  1003. .IP "\(bu" 2
  1004. \fBEsys_FlushContext()\fP (M)
  1005. .IP "\(bu" 2
  1006. \fBEsys_Import()\fP (M)
  1007. .IP "\(bu" 2
  1008. \fBEsys_Load()\fP (M)
  1009. .IP "\(bu" 2
  1010. \fBEsys_PolicyAuthValue()\fP (M)
  1011. .IP "\(bu" 2
  1012. \fBEsys_PolicyCommandCode()\fP (M)
  1013. .IP "\(bu" 2
  1014. \fBEsys_PolicyGetDigest()\fP (M)
  1015. .IP "\(bu" 2
  1016. \fBEsys_ReadPublic()\fP (M)
  1017. .IP "\(bu" 2
  1018. \fBEsys_StartAuthSession()\fP (M)
  1019. .PP
  1020. .PP
  1021. \fBParameters:\fP
  1022. .RS 4
  1023. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1024. .RE
  1025. .PP
  1026. \fBReturn values:\fP
  1027. .RS 4
  1028. \fIEXIT_FAILURE\fP
  1029. .br
  1030. \fIEXIT_SUCCESS\fP
  1031. .RE
  1032. .PP
  1033. .SS "test_esys_lock (\fBESYS_CONTEXT\fP * esys_context)"
  1034. Test the ESYS functions related to TPM locks\&.
  1035. .PP
  1036. \fBNote:\fP platform authorization needed\&.
  1037. .PP
  1038. Tested ESYS commands:
  1039. .IP "\(bu" 2
  1040. \fBEsys_DictionaryAttackLockReset()\fP (M)
  1041. .IP "\(bu" 2
  1042. \fBEsys_DictionaryAttackParameters()\fP (M)
  1043. .IP "\(bu" 2
  1044. \fBEsys_NV_GlobalWriteLock()\fP (O)
  1045. .PP
  1046. .PP
  1047. \fBParameters:\fP
  1048. .RS 4
  1049. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1050. .RE
  1051. .PP
  1052. \fBReturn values:\fP
  1053. .RS 4
  1054. \fIEXIT_FAILURE\fP
  1055. .br
  1056. \fIEXIT_SKIP\fP
  1057. .br
  1058. \fIEXIT_SUCCESS\fP
  1059. .RE
  1060. .PP
  1061. .SS "test_esys_make_credential (\fBESYS_CONTEXT\fP * esys_context)"
  1062. This test is intended to test the function Esys_MakeCredential We start by creating a primary key (Esys_CreatePrimary)\&.
  1063. .PP
  1064. Based in the primary a second key will be created\&. The public part of the key will be loaded by the function Esys_LoadExternal\&. A credential will be encrypted with this key with the command Esys_MakeCredential\&. The credential will be activated with Esys_ActivateCredential\&.
  1065. .PP
  1066. Tested ESYS commands:
  1067. .IP "\(bu" 2
  1068. \fBEsys_ActivateCredential()\fP (M)
  1069. .IP "\(bu" 2
  1070. \fBEsys_Create()\fP (M)
  1071. .IP "\(bu" 2
  1072. \fBEsys_CreatePrimary()\fP (M)
  1073. .IP "\(bu" 2
  1074. \fBEsys_FlushContext()\fP (M)
  1075. .IP "\(bu" 2
  1076. \fBEsys_Load()\fP (M)
  1077. .IP "\(bu" 2
  1078. Esys_LoadExternal() (M)
  1079. .IP "\(bu" 2
  1080. \fBEsys_MakeCredential()\fP (M)
  1081. .IP "\(bu" 2
  1082. \fBEsys_ReadPublic()\fP (M)
  1083. .IP "\(bu" 2
  1084. \fBEsys_StartAuthSession()\fP (M)
  1085. .PP
  1086. .PP
  1087. Used compiler defines: TEST_SESSION
  1088. .PP
  1089. \fBParameters:\fP
  1090. .RS 4
  1091. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1092. .RE
  1093. .PP
  1094. \fBReturn values:\fP
  1095. .RS 4
  1096. \fIEXIT_FAILURE\fP
  1097. .br
  1098. \fIEXIT_SUCCESS\fP
  1099. .RE
  1100. .PP
  1101. .SS "test_esys_nv_certify (\fBESYS_CONTEXT\fP * esys_context)"
  1102. This test is intended to test the command Esys_NV_Certify\&.
  1103. .PP
  1104. We create a RSA primary signing key which will be used as signing key for the NV data\&.
  1105. .PP
  1106. Tested ESYS commands:
  1107. .IP "\(bu" 2
  1108. \fBEsys_CreatePrimary()\fP (M)
  1109. .IP "\(bu" 2
  1110. \fBEsys_FlushContext()\fP (M)
  1111. .IP "\(bu" 2
  1112. \fBEsys_NV_Certify()\fP (O)
  1113. .IP "\(bu" 2
  1114. \fBEsys_NV_DefineSpace()\fP (M)
  1115. .IP "\(bu" 2
  1116. \fBEsys_NV_UndefineSpace()\fP (M)
  1117. .IP "\(bu" 2
  1118. \fBEsys_NV_Write()\fP (M)
  1119. .PP
  1120. .PP
  1121. \fBParameters:\fP
  1122. .RS 4
  1123. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1124. .RE
  1125. .PP
  1126. \fBReturn values:\fP
  1127. .RS 4
  1128. \fIEXIT_FAILURE\fP
  1129. .br
  1130. \fIEXIT_SKIP\fP
  1131. .br
  1132. \fIEXIT_SUCCESS\fP
  1133. .RE
  1134. .PP
  1135. .SS "test_esys_nv_ram_counter (\fBESYS_CONTEXT\fP * esys_context)"
  1136. This test is intended to test the definition of a counter in NV ram and to test the ESYS NV_Increment function\&.
  1137. .PP
  1138. Tested ESYS commands:
  1139. .IP "\(bu" 2
  1140. \fBEsys_FlushContext()\fP (M)
  1141. .IP "\(bu" 2
  1142. \fBEsys_NV_DefineSpace()\fP (M)
  1143. .IP "\(bu" 2
  1144. \fBEsys_NV_Increment()\fP (M)
  1145. .IP "\(bu" 2
  1146. \fBEsys_NV_Read()\fP (M)
  1147. .IP "\(bu" 2
  1148. \fBEsys_NV_ReadPublic()\fP (M)
  1149. .IP "\(bu" 2
  1150. \fBEsys_NV_UndefineSpace()\fP (M)
  1151. .IP "\(bu" 2
  1152. \fBEsys_StartAuthSession()\fP (M)
  1153. .PP
  1154. .PP
  1155. Used compiler defines: TEST_SESSION
  1156. .PP
  1157. \fBParameters:\fP
  1158. .RS 4
  1159. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1160. .RE
  1161. .PP
  1162. \fBReturn values:\fP
  1163. .RS 4
  1164. \fIEXIT_FAILURE\fP
  1165. .br
  1166. \fIEXIT_SUCCESS\fP
  1167. .RE
  1168. .PP
  1169. .SS "test_esys_nv_ram_extend_index (\fBESYS_CONTEXT\fP * esys_context)"
  1170. This test is intended to test the ESYS nv define space, nv extend, and nv read command\&. The names stored in the ESYS resource are compared with the names delivered from the TPM by the command ReadPublic\&.
  1171. .PP
  1172. Tested ESYS commands:
  1173. .IP "\(bu" 2
  1174. \fBEsys_FlushContext()\fP (M)
  1175. .IP "\(bu" 2
  1176. \fBEsys_NV_DefineSpace()\fP (M)
  1177. .IP "\(bu" 2
  1178. \fBEsys_NV_Extend()\fP (M)
  1179. .IP "\(bu" 2
  1180. \fBEsys_NV_Read()\fP (M)
  1181. .IP "\(bu" 2
  1182. \fBEsys_NV_ReadPublic()\fP (M)
  1183. .IP "\(bu" 2
  1184. \fBEsys_NV_UndefineSpace()\fP (M)
  1185. .IP "\(bu" 2
  1186. \fBEsys_StartAuthSession()\fP (M)
  1187. .PP
  1188. .PP
  1189. Used compiler defines: TEST_SESSION
  1190. .PP
  1191. \fBParameters:\fP
  1192. .RS 4
  1193. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1194. .RE
  1195. .PP
  1196. \fBReturn values:\fP
  1197. .RS 4
  1198. \fIEXIT_FAILURE\fP
  1199. .br
  1200. \fIEXIT_SUCCESS\fP
  1201. .RE
  1202. .PP
  1203. .SS "test_esys_nv_ram_ordinary_index (\fBESYS_CONTEXT\fP * esys_context)"
  1204. This test is intended to test the ESYS commands nv define space, nv write, nv read command, nv lock write and nv lock read, and nv undefine\&.
  1205. .PP
  1206. The names stored in the ESYS resource are compared with the names delivered from the TPM by the command ReadPublic\&. only one of the tests NV_ReadLock and NV_WriteLock can be activated by the defines TEST_READ_LOCK and TEST_WRITE_LOCK (-D option)
  1207. .PP
  1208. Tested ESYS commands:
  1209. .IP "\(bu" 2
  1210. \fBEsys_FlushContext()\fP (M)
  1211. .IP "\(bu" 2
  1212. \fBEsys_NV_DefineSpace()\fP (M)
  1213. .IP "\(bu" 2
  1214. \fBEsys_NV_Read()\fP (M)
  1215. .IP "\(bu" 2
  1216. \fBEsys_NV_ReadLock()\fP (M)
  1217. .IP "\(bu" 2
  1218. \fBEsys_NV_ReadPublic()\fP (M)
  1219. .IP "\(bu" 2
  1220. \fBEsys_NV_UndefineSpace()\fP (M)
  1221. .IP "\(bu" 2
  1222. \fBEsys_NV_Write()\fP (M)
  1223. .IP "\(bu" 2
  1224. \fBEsys_NV_WriteLock()\fP (M)
  1225. .IP "\(bu" 2
  1226. \fBEsys_StartAuthSession()\fP (M)
  1227. .PP
  1228. .PP
  1229. Used compiler defines: TEST_READ_LOCK TEST_SESSION TEST_WRITE_LOCK
  1230. .PP
  1231. \fBParameters:\fP
  1232. .RS 4
  1233. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1234. .RE
  1235. .PP
  1236. \fBReturn values:\fP
  1237. .RS 4
  1238. \fIEXIT_FAILURE\fP
  1239. .br
  1240. \fIEXIT_SUCCESS\fP
  1241. .RE
  1242. .PP
  1243. .SS "test_esys_nv_ram_set_bits (\fBESYS_CONTEXT\fP * esys_context)"
  1244. This test is intended to test the definition of a bit field in NV ram and to test the ESYS NV_SetBits function\&.
  1245. .PP
  1246. Tested ESYS commands:
  1247. .IP "\(bu" 2
  1248. \fBEsys_FlushContext()\fP (M)
  1249. .IP "\(bu" 2
  1250. \fBEsys_NV_DefineSpace()\fP (M)
  1251. .IP "\(bu" 2
  1252. \fBEsys_NV_Read()\fP (M)
  1253. .IP "\(bu" 2
  1254. \fBEsys_NV_ReadPublic()\fP (M)
  1255. .IP "\(bu" 2
  1256. \fBEsys_NV_SetBits()\fP (M)
  1257. .IP "\(bu" 2
  1258. \fBEsys_NV_UndefineSpace()\fP (M)
  1259. .IP "\(bu" 2
  1260. \fBEsys_StartAuthSession()\fP (M)
  1261. .PP
  1262. .PP
  1263. Used compiler defines: TEST_SESSION
  1264. .PP
  1265. \fBParameters:\fP
  1266. .RS 4
  1267. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1268. .RE
  1269. .PP
  1270. \fBReturn values:\fP
  1271. .RS 4
  1272. \fIEXIT_FAILURE\fP
  1273. .br
  1274. \fIEXIT_SUCCESS\fP
  1275. .RE
  1276. .PP
  1277. .SS "test_esys_object_changeauth (\fBESYS_CONTEXT\fP * esys_context)"
  1278. This test is intended to test the ESYS command ObjectChangeAuth\&.
  1279. .PP
  1280. We start by creating a primary key (Esys_CreatePrimary)\&. The auth value for this primary will be changed\&.
  1281. .PP
  1282. Tested ESYS commands:
  1283. .IP "\(bu" 2
  1284. \fBEsys_Create()\fP (M)
  1285. .IP "\(bu" 2
  1286. \fBEsys_CreatePrimary()\fP (M)
  1287. .IP "\(bu" 2
  1288. \fBEsys_FlushContext()\fP (M)
  1289. .IP "\(bu" 2
  1290. \fBEsys_Load()\fP (M)
  1291. .IP "\(bu" 2
  1292. \fBEsys_ObjectChangeAuth()\fP (M)
  1293. .PP
  1294. .PP
  1295. \fBParameters:\fP
  1296. .RS 4
  1297. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1298. .RE
  1299. .PP
  1300. \fBReturn values:\fP
  1301. .RS 4
  1302. \fIEXIT_FAILURE\fP
  1303. .br
  1304. \fIEXIT_SUCCESS\fP
  1305. .RE
  1306. .PP
  1307. .SS "test_esys_pcr_auth_value (\fBESYS_CONTEXT\fP * esys_context)"
  1308. Test the commands Esys_PCR_SetAuthValue and Esys_PCR_SetAuthPolicy\&.
  1309. .PP
  1310. \fBNote:\fP platform authorization needed\&.
  1311. .PP
  1312. Tested ESYS commands:
  1313. .IP "\(bu" 2
  1314. \fBEsys_PCR_SetAuthPolicy()\fP (O)
  1315. .IP "\(bu" 2
  1316. \fBEsys_PCR_SetAuthValue()\fP (O)
  1317. .PP
  1318. .PP
  1319. \fBParameters:\fP
  1320. .RS 4
  1321. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1322. .RE
  1323. .PP
  1324. \fBReturn values:\fP
  1325. .RS 4
  1326. \fIEXIT_FAILURE\fP
  1327. .br
  1328. \fIEXIT_SKIP\fP
  1329. .br
  1330. \fIEXIT_SUCCESS\fP
  1331. .RE
  1332. .PP
  1333. .SS "test_esys_pcr_basic (\fBESYS_CONTEXT\fP * esys_context)"
  1334. Test the basic commands for PCR processing\&.
  1335. .PP
  1336. \fBNote:\fP platform authorization needed\&.
  1337. .PP
  1338. Tested ESYS commands:
  1339. .IP "\(bu" 2
  1340. \fBEsys_PCR_Allocate()\fP (M)
  1341. .IP "\(bu" 2
  1342. \fBEsys_PCR_Event()\fP (M)
  1343. .IP "\(bu" 2
  1344. \fBEsys_PCR_Extend()\fP (M)
  1345. .IP "\(bu" 2
  1346. \fBEsys_PCR_Read()\fP (M)
  1347. .IP "\(bu" 2
  1348. \fBEsys_PCR_Reset()\fP (M)
  1349. .PP
  1350. .PP
  1351. \fBParameters:\fP
  1352. .RS 4
  1353. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1354. .RE
  1355. .PP
  1356. \fBReturn values:\fP
  1357. .RS 4
  1358. \fIEXIT_FAILURE\fP
  1359. .br
  1360. \fIEXIT_SKIP\fP
  1361. .br
  1362. \fIEXIT_SUCCESS\fP
  1363. .RE
  1364. .PP
  1365. .SS "test_esys_policy_authorize (\fBESYS_CONTEXT\fP * esys_context)"
  1366. This test is intended to test the ESYS policy authorization\&.
  1367. .PP
  1368. Tested ESYS commands:
  1369. .IP "\(bu" 2
  1370. \fBEsys_CreatePrimary()\fP (M)
  1371. .IP "\(bu" 2
  1372. \fBEsys_FlushContext()\fP (M)
  1373. .IP "\(bu" 2
  1374. \fBEsys_PolicyAuthorize()\fP (M)
  1375. .IP "\(bu" 2
  1376. \fBEsys_PolicyGetDigest()\fP (M)
  1377. .IP "\(bu" 2
  1378. \fBEsys_ReadPublic()\fP (M)
  1379. .IP "\(bu" 2
  1380. \fBEsys_StartAuthSession()\fP (M)
  1381. .PP
  1382. .PP
  1383. \fBParameters:\fP
  1384. .RS 4
  1385. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1386. .RE
  1387. .PP
  1388. \fBReturn values:\fP
  1389. .RS 4
  1390. \fIEXIT_FAILURE\fP
  1391. .br
  1392. \fIEXIT_SUCCESS\fP
  1393. .RE
  1394. .PP
  1395. .SS "test_esys_policy_authorize_nv_opt (\fBESYS_CONTEXT\fP * esys_context)"
  1396. This test is intended to test the ESYS policy commands, not tested in other test cases\&. When possoble the commands are tested with a trial session and the policy digest is compared with the expected digest\&.
  1397. .PP
  1398. Tested ESYS commands:
  1399. .IP "\(bu" 2
  1400. \fBEsys_FlushContext()\fP (M)
  1401. .IP "\(bu" 2
  1402. \fBEsys_NV_DefineSpace()\fP (M)
  1403. .IP "\(bu" 2
  1404. Esys_PolicyAuthorizeNV() (F)
  1405. .IP "\(bu" 2
  1406. \fBEsys_PolicyNV()\fP (M)
  1407. .PP
  1408. .PP
  1409. \fBParameters:\fP
  1410. .RS 4
  1411. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1412. .RE
  1413. .PP
  1414. \fBReturn values:\fP
  1415. .RS 4
  1416. \fIEXIT_FAILURE\fP
  1417. .br
  1418. \fIEXIT_SKIP\fP
  1419. .br
  1420. \fIEXIT_SUCCESS\fP
  1421. .RE
  1422. .PP
  1423. .SS "test_esys_policy_nv_changeauth (\fBESYS_CONTEXT\fP * esys_context)"
  1424. This test is intended to test the ESYS commands PolicyAuthValue, PolicyCommandCode, Esys_PolicyGetDigest, and NV_ChangeAuth\&.
  1425. .PP
  1426. First in a trial session the policy value to ensure that the auth value is included in the policy session used for NV_ChangeAuth is computed\&. A NV ram space with this policy is defined afterwards\&. With a real policy session the auth value of this NV ram space will be changed\&.
  1427. .PP
  1428. Tested ESYS commands:
  1429. .IP "\(bu" 2
  1430. \fBEsys_FlushContext()\fP (M)
  1431. .IP "\(bu" 2
  1432. \fBEsys_NV_ChangeAuth()\fP (M)
  1433. .IP "\(bu" 2
  1434. \fBEsys_NV_DefineSpace()\fP (M)
  1435. .IP "\(bu" 2
  1436. \fBEsys_NV_UndefineSpace()\fP (M)
  1437. .IP "\(bu" 2
  1438. \fBEsys_PolicyAuthValue()\fP (M)
  1439. .IP "\(bu" 2
  1440. \fBEsys_PolicyCommandCode()\fP (M)
  1441. .IP "\(bu" 2
  1442. \fBEsys_PolicyGetDigest()\fP (M)
  1443. .IP "\(bu" 2
  1444. \fBEsys_StartAuthSession()\fP (M)
  1445. .PP
  1446. .PP
  1447. \fBParameters:\fP
  1448. .RS 4
  1449. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1450. .RE
  1451. .PP
  1452. \fBReturn values:\fP
  1453. .RS 4
  1454. \fIEXIT_FAILURE\fP
  1455. .br
  1456. \fIEXIT_SUCCESS\fP
  1457. .RE
  1458. .PP
  1459. .SS "test_esys_policy_nv_undefine_special (\fBESYS_CONTEXT\fP * esys_context)"
  1460. This test is intended to test the ESYS command Esys_NV_UndefineSpaceSpecial, The NV space attributes TPMA_NV_PLATFORMCREATE and TPMA_NV_POLICY_DELETE have to be set\&.
  1461. .PP
  1462. A policy has to be defined for the command UndefineSpaceSpecial\&. The special handling whether the auth value is not used in the HMAC response verification will be checked\&.
  1463. .PP
  1464. \fBNote:\fP platform authorization needed\&.
  1465. .PP
  1466. Tested ESYS commands:
  1467. .IP "\(bu" 2
  1468. \fBEsys_FlushContext()\fP (M)
  1469. .IP "\(bu" 2
  1470. \fBEsys_NV_DefineSpace()\fP (M)
  1471. .IP "\(bu" 2
  1472. \fBEsys_NV_UndefineSpaceSpecial()\fP (M)
  1473. .IP "\(bu" 2
  1474. \fBEsys_PolicyAuthValue()\fP (M)
  1475. .IP "\(bu" 2
  1476. \fBEsys_PolicyCommandCode()\fP (M)
  1477. .IP "\(bu" 2
  1478. \fBEsys_PolicyGetDigest()\fP (M)
  1479. .IP "\(bu" 2
  1480. \fBEsys_StartAuthSession()\fP (M)
  1481. .PP
  1482. .PP
  1483. \fBParameters:\fP
  1484. .RS 4
  1485. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1486. .RE
  1487. .PP
  1488. \fBReturn values:\fP
  1489. .RS 4
  1490. \fIEXIT_FAILURE\fP
  1491. .br
  1492. \fIEXIT_SKIP\fP
  1493. .br
  1494. \fIEXIT_SUCCESS\fP
  1495. .RE
  1496. .PP
  1497. < Undefine will only possible with policy
  1498. .SS "test_esys_policy_password (\fBESYS_CONTEXT\fP * esys_context)"
  1499. This test is intended to test the ESYS command PolicyPassword\&.
  1500. .PP
  1501. First in a trial session the policy value to ensure that auth value is included in the policy session used for authorization is computed\&. We start by creating a primary key (Esys_CreatePrimary) with this policy value and a certain authorization\&. Than a second key it created with a PoliyPassword policy session\&.
  1502. .PP
  1503. Tested ESYS commands:
  1504. .IP "\(bu" 2
  1505. \fBEsys_Create()\fP (M)
  1506. .IP "\(bu" 2
  1507. \fBEsys_CreatePrimary()\fP (M)
  1508. .IP "\(bu" 2
  1509. \fBEsys_FlushContext()\fP (M)
  1510. .IP "\(bu" 2
  1511. \fBEsys_PolicyGetDigest()\fP (M)
  1512. .IP "\(bu" 2
  1513. \fBEsys_PolicyPassword()\fP (M)
  1514. .IP "\(bu" 2
  1515. \fBEsys_StartAuthSession()\fP (M)
  1516. .PP
  1517. .PP
  1518. \fBParameters:\fP
  1519. .RS 4
  1520. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1521. .RE
  1522. .PP
  1523. \fBReturn values:\fP
  1524. .RS 4
  1525. \fIEXIT_FAILURE\fP
  1526. .br
  1527. \fIEXIT_SUCCESS\fP
  1528. .RE
  1529. .PP
  1530. .SS "test_esys_policy_physical_presence_opt (\fBESYS_CONTEXT\fP * esys_context)"
  1531. This test is intended to test the ESYS policy commands, not tested in other test cases\&. When possoble the commands are tested with a trial session and the policy digest is compared with the expected digest\&.
  1532. .PP
  1533. Tested ESYS commands:
  1534. .IP "\(bu" 2
  1535. \fBEsys_PolicyPhysicalPresence()\fP (O)
  1536. .PP
  1537. .PP
  1538. \fBParameters:\fP
  1539. .RS 4
  1540. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1541. .RE
  1542. .PP
  1543. \fBReturn values:\fP
  1544. .RS 4
  1545. \fIEXIT_FAILURE\fP
  1546. .br
  1547. \fIEXIT_SKIP\fP
  1548. .br
  1549. \fIEXIT_SUCCESS\fP
  1550. .RE
  1551. .PP
  1552. .SS "test_esys_policy_regression (\fBESYS_CONTEXT\fP * esys_context)"
  1553. This test is intended to test the ESYS policy commands, not tested in other test cases\&. When possoble the commands are tested with a trial session and the policy digest is compared with the expected digest\&.
  1554. .PP
  1555. Tested ESYS commands:
  1556. .IP "\(bu" 2
  1557. \fBEsys_FlushContext()\fP (M)
  1558. .IP "\(bu" 2
  1559. \fBEsys_NV_DefineSpace()\fP (M)
  1560. .IP "\(bu" 2
  1561. \fBEsys_NV_UndefineSpace()\fP (M)
  1562. .IP "\(bu" 2
  1563. \fBEsys_PolicyCounterTimer()\fP (M)
  1564. .IP "\(bu" 2
  1565. \fBEsys_PolicyDuplicationSelect()\fP (M)
  1566. .IP "\(bu" 2
  1567. \fBEsys_PolicyGetDigest()\fP (M)
  1568. .IP "\(bu" 2
  1569. \fBEsys_PolicyNV()\fP (M)
  1570. .IP "\(bu" 2
  1571. \fBEsys_PolicyNameHash()\fP (M)
  1572. .IP "\(bu" 2
  1573. \fBEsys_PolicyNvWritten()\fP (M)
  1574. .IP "\(bu" 2
  1575. \fBEsys_PolicyOR()\fP (M)
  1576. .IP "\(bu" 2
  1577. \fBEsys_PolicyPCR()\fP (M)
  1578. .IP "\(bu" 2
  1579. \fBEsys_PolicyPhysicalPresence()\fP (O)
  1580. .IP "\(bu" 2
  1581. \fBEsys_PolicyRestart()\fP (M)
  1582. .IP "\(bu" 2
  1583. \fBEsys_SetPrimaryPolicy()\fP (M)
  1584. .IP "\(bu" 2
  1585. \fBEsys_StartAuthSession()\fP (M)
  1586. .PP
  1587. .PP
  1588. \fBParameters:\fP
  1589. .RS 4
  1590. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1591. .RE
  1592. .PP
  1593. \fBReturn values:\fP
  1594. .RS 4
  1595. \fIEXIT_FAILURE\fP
  1596. .br
  1597. \fIEXIT_SKIP\fP
  1598. .br
  1599. \fIEXIT_SUCCESS\fP
  1600. .RE
  1601. .PP
  1602. .SS "test_esys_policy_template_opt (\fBESYS_CONTEXT\fP * esys_context)"
  1603. This test is intended to test the ESYS policy commands, not tested in other test cases\&. When possoble the commands are tested with a trial session and the policy digest is compared with the expected digest\&.
  1604. .PP
  1605. Tested ESYS commands:
  1606. .IP "\(bu" 2
  1607. \fBEsys_FlushContext()\fP (M)
  1608. .IP "\(bu" 2
  1609. Esys_PolicyTemplate() (F)
  1610. .PP
  1611. .PP
  1612. \fBParameters:\fP
  1613. .RS 4
  1614. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1615. .RE
  1616. .PP
  1617. \fBReturn values:\fP
  1618. .RS 4
  1619. \fIEXIT_FAILURE\fP
  1620. .br
  1621. \fIEXIT_SKIP\fP
  1622. .br
  1623. \fIEXIT_SUCCESS\fP
  1624. .RE
  1625. .PP
  1626. .SS "test_esys_policy_ticket (\fBESYS_CONTEXT\fP * esys_context)"
  1627. This test is intended to test the ESYS policy commands related to signed authorization actions\&.
  1628. .PP
  1629. Esys_PolicySigned, Esys_PolicyTicket, and Esys_PolicySecret\&.
  1630. .PP
  1631. Tested ESYS commands:
  1632. .IP "\(bu" 2
  1633. \fBEsys_CreatePrimary()\fP (M)
  1634. .IP "\(bu" 2
  1635. \fBEsys_FlushContext()\fP (M)
  1636. .IP "\(bu" 2
  1637. \fBEsys_HashSequenceStart()\fP (M)
  1638. .IP "\(bu" 2
  1639. \fBEsys_PolicySecret()\fP (M)
  1640. .IP "\(bu" 2
  1641. \fBEsys_PolicySigned()\fP (M)
  1642. .IP "\(bu" 2
  1643. \fBEsys_PolicyTicket()\fP (O)
  1644. .IP "\(bu" 2
  1645. \fBEsys_ReadPublic()\fP (M)
  1646. .IP "\(bu" 2
  1647. Esys_SequenceComplete() (M)
  1648. .IP "\(bu" 2
  1649. \fBEsys_SequenceUpdate()\fP (M)
  1650. .IP "\(bu" 2
  1651. \fBEsys_Sign()\fP (M)
  1652. .IP "\(bu" 2
  1653. \fBEsys_StartAuthSession()\fP (M)
  1654. .PP
  1655. .PP
  1656. \fBParameters:\fP
  1657. .RS 4
  1658. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1659. .RE
  1660. .PP
  1661. \fBReturn values:\fP
  1662. .RS 4
  1663. \fIEXIT_FAILURE\fP
  1664. .br
  1665. \fIEXIT_SUCCESS\fP
  1666. .RE
  1667. .PP
  1668. .SS "test_esys_pp_commands (\fBESYS_CONTEXT\fP * esys_context)"
  1669. Test the ESYS function Esys_PP_Commands\&.
  1670. .PP
  1671. If the test requires physical presence, the test is skipped\&.
  1672. .PP
  1673. \fBNote:\fP platform authorization needed\&.
  1674. .PP
  1675. Tested ESYS commands:
  1676. .IP "\(bu" 2
  1677. \fBEsys_PP_Commands()\fP (O)
  1678. .PP
  1679. .PP
  1680. \fBParameters:\fP
  1681. .RS 4
  1682. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1683. .RE
  1684. .PP
  1685. \fBReturn values:\fP
  1686. .RS 4
  1687. \fIEXIT_FAILURE\fP
  1688. .br
  1689. \fIEXIT_SKIP\fP
  1690. .br
  1691. \fIEXIT_SUCCESS\fP
  1692. .RE
  1693. .PP
  1694. .SS "test_esys_quote (\fBESYS_CONTEXT\fP * esys_context)"
  1695. This test is intended to test the quote command with password authentication\&.
  1696. .PP
  1697. We create a RSA primary signing key which will be used for signing\&.
  1698. .PP
  1699. Tested ESYS commands:
  1700. .IP "\(bu" 2
  1701. \fBEsys_CreatePrimary()\fP (M)
  1702. .IP "\(bu" 2
  1703. \fBEsys_FlushContext()\fP (M)
  1704. .IP "\(bu" 2
  1705. \fBEsys_Quote()\fP (M)
  1706. .PP
  1707. .PP
  1708. \fBParameters:\fP
  1709. .RS 4
  1710. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1711. .RE
  1712. .PP
  1713. \fBReturn values:\fP
  1714. .RS 4
  1715. \fIEXIT_FAILURE\fP
  1716. .br
  1717. \fIEXIT_SUCCESS\fP
  1718. .RE
  1719. .PP
  1720. .SS "test_esys_rsa_encrypt_decrypt (\fBESYS_CONTEXT\fP * esys_context)"
  1721. This test is intended to test RSA encryption / decryption\&. with password authentication\&. We create a RSA primary key (Esys_CreatePrimary) for every crypto action This key will be used for encryption/decryption in with the schemes: TPM2_ALG_NULL, TPM2_ALG_RSAES, and TPM2_ALG_OAEP
  1722. .PP
  1723. Tested ESYS commands:
  1724. .IP "\(bu" 2
  1725. \fBEsys_CreatePrimary()\fP (M)
  1726. .IP "\(bu" 2
  1727. \fBEsys_FlushContext()\fP (M)
  1728. .IP "\(bu" 2
  1729. \fBEsys_RSA_Decrypt()\fP (M)
  1730. .IP "\(bu" 2
  1731. \fBEsys_RSA_Encrypt()\fP (M)
  1732. .PP
  1733. .PP
  1734. \fBParameters:\fP
  1735. .RS 4
  1736. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1737. .RE
  1738. .PP
  1739. \fBReturn values:\fP
  1740. .RS 4
  1741. \fIEXIT_FAILURE\fP
  1742. .br
  1743. \fIEXIT_SUCCESS\fP
  1744. .RE
  1745. .PP
  1746. .SS "test_esys_save_and_load_context (\fBESYS_CONTEXT\fP * esys_context)"
  1747. This test is intended to test context save and load\&.
  1748. .PP
  1749. We start by creating a primary key (Esys_CreatePrimary)\&. Based in the primary a second key with an password define in the sensitive area will be created\&. This key will be loaded and saved with the ContextSave command\&. After the key is flushed the key will be loaded again with ContextLoad and will be used to create a third key
  1750. .PP
  1751. Tested ESYS commands:
  1752. .IP "\(bu" 2
  1753. \fBEsys_ContextLoad()\fP (M)
  1754. .IP "\(bu" 2
  1755. \fBEsys_ContextSave()\fP (M)
  1756. .IP "\(bu" 2
  1757. \fBEsys_Create()\fP (M)
  1758. .IP "\(bu" 2
  1759. \fBEsys_CreatePrimary()\fP (M)
  1760. .IP "\(bu" 2
  1761. \fBEsys_FlushContext()\fP (M)
  1762. .IP "\(bu" 2
  1763. \fBEsys_Load()\fP (M)
  1764. .PP
  1765. .PP
  1766. Used compiler defines: TEST_ECC
  1767. .PP
  1768. \fBParameters:\fP
  1769. .RS 4
  1770. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1771. .RE
  1772. .PP
  1773. \fBReturn values:\fP
  1774. .RS 4
  1775. \fIEXIT_FAILURE\fP
  1776. .br
  1777. \fIEXIT_SUCCESS\fP
  1778. .RE
  1779. .PP
  1780. .SS "test_esys_set_algorithm_set (\fBESYS_CONTEXT\fP * esys_context)"
  1781. Test the ESYS function Esys_SetAlgorithmSet\&.
  1782. .PP
  1783. \fBNote:\fP platform authorization needed\&.
  1784. .PP
  1785. Tested ESYS commands:
  1786. .IP "\(bu" 2
  1787. \fBEsys_SetAlgorithmSet()\fP (O)
  1788. .PP
  1789. .PP
  1790. \fBParameters:\fP
  1791. .RS 4
  1792. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1793. .RE
  1794. .PP
  1795. \fBReturn values:\fP
  1796. .RS 4
  1797. \fIEXIT_FAILURE\fP
  1798. .br
  1799. \fIEXIT_SKIP\fP
  1800. .br
  1801. \fIEXIT_SUCCESS\fP
  1802. .RE
  1803. .PP
  1804. .SS "test_esys_stir_random (\fBESYS_CONTEXT\fP * esys_context)"
  1805. Test the ESYS function Esys_StirRandom\&.
  1806. .PP
  1807. Tested ESYS commands:
  1808. .IP "\(bu" 2
  1809. \fBEsys_StirRandom()\fP (M)
  1810. .PP
  1811. .PP
  1812. \fBParameters:\fP
  1813. .RS 4
  1814. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1815. .RE
  1816. .PP
  1817. \fBReturn values:\fP
  1818. .RS 4
  1819. \fIEXIT_FAILURE\fP
  1820. .br
  1821. \fIEXIT_SUCCESS\fP
  1822. .RE
  1823. .PP
  1824. .SS "test_esys_testparms (\fBESYS_CONTEXT\fP * esys_context)"
  1825. Test the ESYS function Esys_TestParms\&.
  1826. .PP
  1827. Tested ESYS commands:
  1828. .IP "\(bu" 2
  1829. \fBEsys_TestParms()\fP (M)
  1830. .PP
  1831. .PP
  1832. \fBParameters:\fP
  1833. .RS 4
  1834. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1835. .RE
  1836. .PP
  1837. \fBReturn values:\fP
  1838. .RS 4
  1839. \fIEXIT_FAILURE\fP
  1840. .br
  1841. \fIEXIT_SUCCESS\fP
  1842. .RE
  1843. .PP
  1844. .SS "test_esys_tpm_tests (\fBESYS_CONTEXT\fP * esys_context)"
  1845. Test the ESYS functions for TPM tests\&.
  1846. .PP
  1847. Tested ESYS commands:
  1848. .IP "\(bu" 2
  1849. \fBEsys_GetTestResult()\fP (M)
  1850. .IP "\(bu" 2
  1851. \fBEsys_IncrementalSelfTest()\fP (M)
  1852. .IP "\(bu" 2
  1853. \fBEsys_SelfTest()\fP (M)
  1854. .PP
  1855. .PP
  1856. \fBParameters:\fP
  1857. .RS 4
  1858. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1859. .RE
  1860. .PP
  1861. \fBReturn values:\fP
  1862. .RS 4
  1863. \fIEXIT_FAILURE\fP
  1864. .br
  1865. \fIEXIT_SUCCESS\fP
  1866. .RE
  1867. .PP
  1868. .SS "test_esys_tr_fromTpmPublic_key (\fBESYS_CONTEXT\fP * ectx)"
  1869. This tests the Esys_TR_FromTPMPublic and Esys_TR_GetName functions by creating an NV Index and then attempting to retrieve an ESYS_TR object for it\&. Then we call Esys_TR_GetName to see if the correct public name has been retrieved\&.
  1870. .PP
  1871. Tested ESYS commands:
  1872. .IP "\(bu" 2
  1873. \fBEsys_CreatePrimary()\fP (M)
  1874. .IP "\(bu" 2
  1875. \fBEsys_EvictControl()\fP (M)
  1876. .IP "\(bu" 2
  1877. \fBEsys_FlushContext()\fP (M)
  1878. .IP "\(bu" 2
  1879. \fBEsys_ReadPublic()\fP (M)
  1880. .PP
  1881. .PP
  1882. \fBParameters:\fP
  1883. .RS 4
  1884. \fIectx\fP The \fBESYS_CONTEXT\fP\&.
  1885. .RE
  1886. .PP
  1887. \fBReturn values:\fP
  1888. .RS 4
  1889. \fIEXIT_FAILURE\fP
  1890. .br
  1891. \fIEXIT_SUCCESS\fP
  1892. .RE
  1893. .PP
  1894. .SS "test_esys_tr_fromTpmPublic_nv (\fBESYS_CONTEXT\fP * ectx)"
  1895. This tests the Esys_TR_FromTPMPublic and Esys_TR_GetName functions by creating an NV Index and then attempting to retrieve an ESYS_TR object for it\&. Then we call Esys_TR_GetName to see if the correct public name has been retrieved\&.
  1896. .PP
  1897. Tested ESYS commands:
  1898. .IP "\(bu" 2
  1899. \fBEsys_NV_DefineSpace()\fP (M)
  1900. .IP "\(bu" 2
  1901. \fBEsys_NV_ReadPublic()\fP (M)
  1902. .IP "\(bu" 2
  1903. \fBEsys_NV_UndefineSpace()\fP (M)
  1904. .PP
  1905. .PP
  1906. \fBParameters:\fP
  1907. .RS 4
  1908. \fIectx\fP The \fBESYS_CONTEXT\fP\&.
  1909. .RE
  1910. .PP
  1911. \fBReturn values:\fP
  1912. .RS 4
  1913. \fIEXIT_FAILURE\fP
  1914. .br
  1915. \fIEXIT_SUCCESS\fP
  1916. .RE
  1917. .PP
  1918. .SS "test_esys_tr_getName_hierarchy (\fBESYS_CONTEXT\fP * ectx)"
  1919. This tests the Esys_TR_FromTPMPublic and Esys_TR_GetName functions by creating an NV Index and then attempting to retrieve an ESYS_TR object for it\&. Then we call Esys_TR_GetName to see if the correct public name has been retrieved\&.
  1920. .PP
  1921. Tested ESYS commands:
  1922. .PP
  1923. \fBParameters:\fP
  1924. .RS 4
  1925. \fIectx\fP The \fBESYS_CONTEXT\fP\&.
  1926. .RE
  1927. .PP
  1928. \fBReturn values:\fP
  1929. .RS 4
  1930. \fIEXIT_FAILURE\fP
  1931. .br
  1932. \fIEXIT_SUCCESS\fP
  1933. .RE
  1934. .PP
  1935. .SS "test_esys_unseal_password_auth (\fBESYS_CONTEXT\fP * esys_context)"
  1936. This test is intended to test the unseal operation for the ESYS command Unseal\&.
  1937. .PP
  1938. We start by creating a primary key (Esys_CreatePrimary)\&. Based on the primary key a second key with a password and the to be sealed data defined in the sensitive area will be created (Esys_Create)\&. This key will be loaded and the unseal command (Esys_Unseal) will be used to retrieve the sealed data\&.
  1939. .PP
  1940. Tested ESYS commands:
  1941. .IP "\(bu" 2
  1942. \fBEsys_Create()\fP (M)
  1943. .IP "\(bu" 2
  1944. \fBEsys_CreatePrimary()\fP (M)
  1945. .IP "\(bu" 2
  1946. \fBEsys_FlushContext()\fP (M)
  1947. .IP "\(bu" 2
  1948. \fBEsys_Load()\fP (M)
  1949. .IP "\(bu" 2
  1950. \fBEsys_Unseal()\fP (M)
  1951. .PP
  1952. .PP
  1953. \fBParameters:\fP
  1954. .RS 4
  1955. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1956. .RE
  1957. .PP
  1958. \fBReturn values:\fP
  1959. .RS 4
  1960. \fIEXIT_FAILURE\fP
  1961. .br
  1962. \fIEXIT_SUCCESS\fP
  1963. .RE
  1964. .PP
  1965. .SS "test_esys_verify_signature (\fBESYS_CONTEXT\fP * esys_context)"
  1966. This test is intended to test the ESYS signing and signature verification\&.
  1967. .PP
  1968. Tested ESYS commands:
  1969. .IP "\(bu" 2
  1970. \fBEsys_CreatePrimary()\fP (M)
  1971. .IP "\(bu" 2
  1972. \fBEsys_FlushContext()\fP (M)
  1973. .IP "\(bu" 2
  1974. \fBEsys_ReadPublic()\fP (M)
  1975. .IP "\(bu" 2
  1976. \fBEsys_Sign()\fP (M)
  1977. .IP "\(bu" 2
  1978. \fBEsys_VerifySignature()\fP (M)
  1979. .PP
  1980. .PP
  1981. \fBParameters:\fP
  1982. .RS 4
  1983. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  1984. .RE
  1985. .PP
  1986. \fBReturn values:\fP
  1987. .RS 4
  1988. \fIEXIT_FAILURE\fP
  1989. .br
  1990. \fIEXIT_SUCCESS\fP
  1991. .RE
  1992. .PP
  1993. .SS "test_esys_zgen_2phase (\fBESYS_CONTEXT\fP * esys_context)"
  1994. This test is intended to test Esys_ECDH_ZGen\&.
  1995. .PP
  1996. The test is based on an ECC key created with Esys_CreatePrimary and data produced by the command Esys_EC_Ephemeral\&.
  1997. .PP
  1998. Tested ESYS commands:
  1999. .IP "\(bu" 2
  2000. \fBEsys_CreatePrimary()\fP (M)
  2001. .IP "\(bu" 2
  2002. \fBEsys_ECDH_ZGen()\fP (M)
  2003. .IP "\(bu" 2
  2004. \fBEsys_EC_Ephemeral()\fP (F)
  2005. .IP "\(bu" 2
  2006. \fBEsys_FlushContext()\fP (M)
  2007. .IP "\(bu" 2
  2008. \fBEsys_StartAuthSession()\fP (M)
  2009. .IP "\(bu" 2
  2010. \fBEsys_ZGen_2Phase()\fP (O)
  2011. .PP
  2012. .PP
  2013. \fBParameters:\fP
  2014. .RS 4
  2015. \fIesys_context\fP The \fBESYS_CONTEXT\fP\&.
  2016. .RE
  2017. .PP
  2018. \fBReturn values:\fP
  2019. .RS 4
  2020. \fIEXIT_FAILURE\fP
  2021. .br
  2022. \fIEXIT_SKIP\fP
  2023. .br
  2024. \fIEXIT_SUCCESS\fP
  2025. .RE
  2026. .PP
  2027. .SH "Author"
  2028. .PP
  2029. Generated automatically by Doxygen for tpm2-tss from the source code\&.