All of lore.kernel.org
 help / color / mirror / Atom feed
* [tpm2] How to use tpm2_getrandom() as API and create a C library
@ 2020-04-08 18:26 muthu.smk
  0 siblings, 0 replies; only message in thread
From: muthu.smk @ 2020-04-08 18:26 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

As a continuation of below thread , and suggested by @williamcroberts here i am sharing my observation on feedback shared by @willams
https://github.com/tpm2-software/tpm2-tools/issues/1971 

Thanks a lot @williamcroberts for your quick response. Regarding your sample code , i cant able to use linux 'system' API or popen call to trigger the executable. Basically its an limitation for me to use these two methods inside my aplication.

Coming to the below 3 methods , it was quite interesting and i have tried last two (Esys_GenRandom and Fapi_GetRandom() i could able to link it to my app with respective library and my application is compiled properly . But when i try to run it , am getting 'context' set with NULL (refer below error log for more info) . Can you please guide me how and what to fill in the 'context' argument .

ERROR:fapi:src/tss2-fapi/api/Fapi_GetRandom.c:66:Fapi_GetRandom() context is NULL: BAD_REFERENCE
Get Random Number got Failed , the reason has been shared below
Failure reason : context or data is NULL

(good) Tss2_Sys_GetRandom
(better) Esys_GetRandom
(best) Fapi_GetRandom

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-08 18:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 18:26 [tpm2] How to use tpm2_getrandom() as API and create a C library muthu.smk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.