1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

tpm2d: Check SWTPM environment variable for swtpm support.

* tpm2d/intel-tss.h (TSS_Create): Check SWTPM.

--

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
NIIBE Yutaka 2023-09-28 13:26:52 +09:00
parent eda3997b43
commit 1da40db03e
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -285,9 +285,15 @@ TSS_Create(TSS_CONTEXT **tssContext)
*/
if (intType)
{
if (strcmp("socsim", intType) == 0) {
tctildr = "mssim";
}
if (strcmp("socsim", intType) == 0)
{
char *swtpm = getenv("SWTPM");
if (!swtpm || strlen(swtpm) == 0)
tctildr = "mssim";
else
tctildr = "swtpm";
}
else if (strcmp("dev", intType) == 0)
{
tctildr = "device";