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>
Only let certain commands that are cancelable be processed
by the thread. Directly process all other commands.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Extend configure.ac to check for the crypto library libtpms is
using and make sure we are using the same here. Due to symbol
clashes between freebl and openssl related to the hash update
functions, we get crashes otherwise.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Rather than checking whether the given file descriptor is a character
device, check whether it is one of the unsupported ones. This addresses
a problem when passing anonymous file descriptors that are not character
devices.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Exclude the swtpm_cert tool and its man page if it is not found
due to it not being compiled due to backlevel gnutls library.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
swtpm_cert is only included in the package if it was built, which works
on >= 15.04.
Get the dependencies right.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Add debian build files to enable building of Debian package using for exampl
debuild -b or dpkg-buildpackage -us -uc
Extend the .gitignore.
The debhelper checks show warnings and errors that will need to be addressed
some other time. For some I don't know how to solve them at the moment.
Signed-off-by: Stefan Berger <stefanb@linux.watson.ibm.com>
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>
Deactivate the checking for the certificate size since different
GnuTLS versions may create certificates of different sizes by adding
additional fields or other data to the cert.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
If the 'swtpm chardev' receives an error on write() or not all bytes
could be written, log an error and terminate.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Use the macros defined in endian.h for endianess conversion.
Fix the conversion of a 64bit variable.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Replace the CUSE TPM with the new BSD implementation.
Update the license references and the license itself.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Eric Richter implemented a clean-room skeleton CUSE driver which
we will now convert to the CUSE TPM. The goal is to replace the
GPL CUSE TPM implementation with this 3-clause BSD implementation.
Among other things, this makes it easier to link with OpenSSL.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>