ports/security/tpm2-tss/files/patch-src_tss2-tcti_tctildr-nodl.c
Andrea Cocito e61592617a security/tpm2-tss: Add patches to avoid using /dev/tpmrm0
FreeBSD does not have an in-kernel Resource Manager for TPM, the tools
must access the /dev/tpm0 device, either directly or through an
userland RM like tpm2-abrmd.

The default behavior of the original code is to try the in kernel RM
on /dev/tpmrm0 as first choice, this causes warnings and errors and
forces the user to override the behavior with options or environment
variables.

This patch removes the attempt to use /dev/tpmrm0 so that the programs
"just work" using the tpm0 device or through tpm2-abrmd.

PR:		286218
Approved by:	maintainer
Pull Request:	https://github.com/freebsd/freebsd-ports/pull/392
2025-05-14 09:53:28 +03:00

12 lines
358 B
C

--- src/tss2-tcti/tctildr-nodl.c.orig 2025-02-22 22:43:21 UTC
+++ src/tss2-tcti/tctildr-nodl.c
@@ -67,7 +67,7 @@ struct {
.init = Tss2_Tcti_Tbs_Init,
.description = "Access to TBS",
},
-#elif defined (__VXWORKS__)
+#elif defined (__VXWORKS__) || defined(__FreeBSD__)
{
.names = {
"libtss2-tcti-device.so.0",