Skip to content

Commit

Permalink
docs: add unixio option to swtpm
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb authored Jul 14, 2024
1 parent 07507f2 commit 9fc7a67
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions doc/swtpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For QEMU, check [this page](./qemu_tpm_setup.md)
sudo apt-get install swtpm tpm2-tools -y
```

## Run SWTPM Emulation
## Run SWTPM Emulation TCP

use TCP to connect to this emulation

Expand All @@ -28,14 +28,35 @@ swtpm socket --tpm2 \
--flags not-need-init,startup-clear
```

## Testing TPM2

Set Transmission Interface (TCTI) swtpm socket, so tpm2-tools use it instead of the default char device interface.

```bash
export TPM2TOOLS_TCTI="swtpm:host=localhost,port=2321"
```

## Run SWTPM Emulation Unix socket

use unix socket to connect to this emulation

```bash
mkdir /tmp/emulated_tpm
swtpm socket --tpm2 \
--server type=unixio,path=/tpm/emulated_tpm/swtpm.sock \
--ctrl type=tcp,port=2322 \
--tpmstate dir=/tmp/emulated_tpm \
--log file="swtpm.log" \
--log level=20 \
--flags not-need-init,startup-clear
```

Set Transmission Interface (TCTI) swtpm socket, so tpm2-tools use it instead of the default char device interface.

```bash
export TPM2TOOLS_TCTI="swtpm:path=/tpm/emulated_tpm/swtpm.sock"
```

## Testing TPM2

keys

```bash
Expand Down

0 comments on commit 9fc7a67

Please sign in to comment.