Commit Graph

124 Commits

Author SHA1 Message Date
Stefan Berger
7c0a033f96 swtpm: add --connect option support
Add support for --connect option for the socket version of the TPM.
This parameter takes the type, port, file descriptor and disconnect
options. Only TCP connections are currently supported.

See updated man pages.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2016-03-18 13:36:40 -04:00
Stefan Berger
81c55814dd swtpm_bios: Exit with error if TPM needs to be reset for activation
Exit with error code 129 if the TPM needs to be reset to become activated.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2016-02-18 09:55:23 -05:00
Stefan Berger
bb420d7481 swtpm: move process owership to common file and enable in all implementations
Move the code to change process ownership into its own function and enable
--runas|-r <owner> in all implementations.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-12-27 18:17:49 -05:00
Stefan Berger
78c5f924bf swtpm: add cuse TPM interface option to swtpm
Now that the CUSE TPM part is BSD licensed, extend the swtpm
program with the cuse option.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-12-20 20:06:57 -05:00
Stefan Berger
ffcb6535d3 swtpm_bios: Add option to give up physical presence
Extend the swtpm_bios tool with an option to give up physical presence.

Have the TPM error codes reflected in the exit error of 128.

Add a test case for the tool.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-12-04 18:23:13 -05:00
Stefan Berger
6852f6c89b swtpm: introduce control channel for chardev TPM
Implement a control channel for the 'chardev' swtpm that implements
a minimal set of control messages for now.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-11-27 22:13:37 -05:00
Stefan Berger
29cfd0a4fd swtpm: add support for listening on chardev
Add support for 'swtpm chardev' that listens for TPM commands on a given
character device and sends responses through it.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-11-08 14:13:23 -05:00
Stefan Berger
bc525ccdab swtpm: Add support for --tpmstate dir=<dir> command line parameter
Add support for the --tpmstate dir=<dir> command line parameter.
It will be used instead of the TPM_PATH, unless it is not set.

Adapt two test cases for the new parameter.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-10-27 21:58:10 -04:00
Stefan Berger
b215173767 swtpm: Add command line parameter for pidfile
Add support for --pid file=<pidfile> command line parameter support.
The swtpm_cuse and swtpm now write their process IDs (pids) into
a file.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-10-26 06:34:14 -04:00
Stefan Berger
39d0c3ded0 man pages: Add man page describing the ioctl's
This patch adds a man page that describes the supported ioctl's.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-10-03 18:42:31 -04:00
Stefan Berger
cf476b14d2 man pages: update on swtpm_ioctl.8
Update swtpm_ioctl.8 to latest content.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-07-02 10:59:01 -04:00
Stefan Berger
5007f2d06f man pages: clarification for swtpm_setup
swtpm_setup uses swtpm executable it finds in the path.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-07-02 10:55:27 -04:00
Stefan Berger
6c2ef667c7 man pages: check in generated man pages
Check in generated man pages that had been missing.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-06-05 16:30:12 -04:00
Stefan Berger
05cd79b843 Support read()/write() for TPM state blob transfer
Support the read/write interface and POSIX API calls for transfer of
TPM state blobs.

Extend the swtpm_ioctl program to support this as well. Use the
environment variable SWTPM_IOCTL_BUFFERSIZE to set the size of the
buffer to use and enable the read/write interface in this (test)
program.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-06-04 18:49:25 -04:00
Stefan Berger
bd98690a4a Add ioctl to get configuration flags about keys in use
Add an ioctl that lets an application retrieve which keys are in use by the
TPM, i.e., file encryption or migration key

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-05-26 07:30:38 -04:00
Stefan Berger
1680c41d9e swtpm: Add a command line option for a migration key
The migration key ensures that TPM state blobs, when retrieved using the
ioctl for getting state blobs, are always encrypted with this key.
When the state is later on loaded back into the TPM using the ioctl
to set the state blobs, the migration key is used to decrypt them.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-05-25 11:18:44 -04:00
root
070d313cb3 samples: rename swtpm-localca.sh to swtpm-localca
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-05-04 00:26:14 -04:00
Stefan Berger
950040f03c swtpm_cuse: implement STOP ioctl
Implement a STOP ioctl in the swtpm and swtpm_ioctl client.
Modify test cases to used swtpm_ioctl --stop.
2015-03-16 11:50:03 -04:00
Stefan Berger
0c0e5b20c6 Update man page with description for new commands
Update the man page of swtpm_ioctl with the new commands for
getting stateblobs from the CUSE TPM and setting stateblobs in
the CUSE TPM.
2015-03-12 09:49:40 -04:00
Stefan Berger
3f7933fc3a fix typo in man page 2014-12-08 12:53:13 -05:00
Stefan Berger
0321a3808d Add ioctl to reset the establishment bit
Add an ioctl to reset the establishment bit. It takes as an
argument the locality to use.
2014-12-08 11:35:16 -05:00
Stefan Berger
05503a8ea0 fixing typo in man page 2014-12-05 15:14:09 -05:00
Stefan Berger
e46a2b6686 merging swtpm-tools into this project 2014-12-05 13:43:21 -05:00
Stefan Berger
f163b20210 initial check-in 2014-12-05 11:16:03 -05:00