From 55fe88aabf6b769b20acc04f5372391ccc73b307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sun, 18 Oct 2020 17:36:28 +0200 Subject: [PATCH] Add TPM2 testing instruxions --- README.md | 14 ++++++++++++++ src/bin/zfs-tpm2-change-key.cpp | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d8c109..ffc1175 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,20 @@ will work on amd64, x32, and i386. See the [repository README](//debian.nabijaczleweli.xyz/README) for more information. --> +### Testing +#### TPM2 + +Build [`swtpm`](//github.com/stefanberger/swtpm), then prepare and run it: +```sh +swtpm_setup --tpmstate tpm-state --tpm2 --createek --display --logfile /dev/stdout --overwrite +swtpm socket --server type=tcp,port=2321 --ctrl type=tcp,port=2322 --tpm2 --tpmstate dir=tpm-state --flags not-need-init --log level=10 +``` + +If your platform has a TPM, switch to `swtpm` by default: +``` +ln -s /usr/lib/i386-linux-gnu/libtss2-tcti-{swtpm,default}.so +``` + ## Reporting bugs There's [the tracker](//todo.sr.ht/~nabijaczleweli/tzpfms), but also see the list below. diff --git a/src/bin/zfs-tpm2-change-key.cpp b/src/bin/zfs-tpm2-change-key.cpp index 09a437c..6b984f1 100644 --- a/src/bin/zfs-tpm2-change-key.cpp +++ b/src/bin/zfs-tpm2-change-key.cpp @@ -13,8 +13,6 @@ #include "../tpm2.hpp" #include "../zfs.hpp" -// ./src/swtpm/swtpm socket --server port=2321 --ctrl type=tcp,port=2322 --tpm2 - #define THIS_BACKEND "TPM2"