ports/security/tpm2-tss/files/patch-src_tss2-tcti_tcti-device.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

13 lines
315 B
C

--- src/tss2-tcti/tcti-device.c.orig 2023-01-23 18:36:16.000000000 +0000
+++ src/tss2-tcti/tcti-device.c 2025-05-08 08:40:29.255475000 +0000
@@ -61,7 +61,9 @@
#ifdef __VXWORKS__
"/tpm0"
#else
+#ifndef __FreeBSD__
"/dev/tpmrm0",
+#endif /* __FreeBSD__ */
"/dev/tpm0",
#endif /* __VX_WORKS__ */
};