Go to file
Stefan Berger 59f46464d5 build-sys: work around broken linker when testing --version-script support
The linker on FreeBSD seems to be broken and fails for other reasons
when testing for support of the --version-script flag. The error
that is reported is:

local symbol 'environ' in /usr/lib/crt1.o is referenced by DSO.

Also __progname is needed.

To work around this problem we add a test.syms file that only has
these two symbols in it, which is enough for the test in
configure.ac and gives version script support in case of the
broken linker.

On FreeBSD TPM 1.2 related tests were failing due to test case 6
failures in case no linker script was used. (Very odd.) This patch
fixes this problem.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-08-30 21:45:16 +00:00
debian build: Build Debian 0.6.0-1-dev1 2018-06-15 18:07:48 -04:00
dist build-sys: Include autogen.sh in the tarball and use for RPM building 2018-08-08 08:59:04 -04:00
include Integrate the TPM 2 into the library; do not compile with TPM 2 yet 2018-06-15 18:07:47 -04:00
m4 build-sys: Check for supported linker flag --version-script 2018-08-30 13:24:54 -04:00
man build-sys: Only remove generated .3 man files 2018-08-03 13:16:22 -04:00
src build-sys: work around broken linker when testing --version-script support 2018-08-30 21:45:16 +00:00
tests build-sys: fix make distcheck 2018-08-02 12:53:20 -04:00
.gitignore tpm2: adapt NVRAM offsets and check structure sizes 2018-06-15 18:07:49 -04:00
.travis.yml tpm2: Build libtpms with TPM 2 code now 2018-06-15 18:07:48 -04:00
autogen.sh build-sys: add a simple autogen.sh 2018-05-26 07:41:18 -04:00
bootstrap.sh Remove config.h.in 2014-06-30 15:04:15 -04:00
CHANGES Initial import of project 2013-10-31 15:33:22 -05:00
configure.ac build-sys: work around broken linker when testing --version-script support 2018-08-30 21:45:16 +00:00
CREDITS Add CREDITS file 2013-10-31 16:37:33 -04:00
DCO1.1.txt Replace the CLA with the DCO, simply requiring a Signed-off-by: 2016-12-21 11:09:38 -05:00
INSTALL Make compileable on Ubuntu and docu for Ubuntu 2014-12-15 22:10:07 -05:00
libtpms.pc.in pkg-config: add cryptolib to libtpms.pc 2018-08-03 13:06:29 -04:00
LICENSE Extend license texts with TPM 2 specifics 2018-06-15 18:07:47 -04:00
Makefile.am build-sys: Include autogen.sh in the tarball and use for RPM building 2018-08-08 08:59:04 -04:00
README tests: add fuzz test 2018-06-15 18:07:49 -04:00

What is libtpms?
----------------

Libtpms is a library that targets the integration of TPM functionality
into hypervisors, primarily into Qemu. Libtpms provides a very narrow
public API for this purpose so that integration is possible. Only the
minimum of necessary APIs are made publicly available.

It is assumed that the user of libtpms is familiar with the concepts
of the Trusted Platform Module (TPM). For the interaction with libtpms
it is necessary to know how to construct valid TPM commands and to
be able to parse their results. It is not within the scope of libtpms's
documentation to provide background on this. See the section on references
below.


What files does the libtpms package provide?
--------------------------------------------

The main libtpms package provides the following files:

/usr/lib64/libtpms.so.0
/usr/lib64/libtpms.so.0.5.1
/usr/share/doc/libtpms-0.5.1
/usr/share/doc/libtpms-0.5.1/CHANGES
/usr/share/doc/libtpms-0.5.1/LICENSE
/usr/share/doc/libtpms-0.5.1/README

Applications can link with -ltpms.


What files does the libtpms development package provide?
--------------------------------------------------------

The libtpms development package (libtpms-devel) provides the following
include files for applications to use:

tpm_error.h
tpm_library.h
tpm_memory.h
tpm_nvfilename.h
tpm_tis.h
tpm_types.h

These files contain the data structures, data types and API calls supported
by libtpms. It is recommended to not use any other API calls than those
provided in these include files.

All APIs are described in man pages. The man pages are part of the libtpms
development package as well:

TPMLIB_DecodeBlob
TPMLIB_GetTPMProperty
TPMLIB_GetVersion
TPMLIB_MainInit
TPMLIB_Process
TPMLIB_RegisterCallbacks
TPMLIB_Terminate
TPMLIB_VolatileAll_Store
TPM_Free
TPM_IO_Hash_Data
TPM_IO_Hash_End
TPM_IO_Hash_Start
TPM_IO_TpmEstablished_Get
TPM_Malloc
TPM_Realloc


How to contribute?
------------------
The mailing list for libtpms is libtpms@googlegroups.com.

For patch submissions, please use a Signed-off-by: <your email> to indicate
agreement to the DCO1.1.txt.


Fuzzing
-------
Initial fuzzing is possible with clang & libfuzzer.

You have to configure the project with --enable-fuzzer
(--enable-sanitizer can also help spot more issues). Then you can
build fuzz and run it with the testing corpus.

Fuzz testing is known to work with Fedora 28 or later. It requires that the
'clang' package is installed.

Ex:
$ ./configure --with-openssl --with-tpm2 --enable-sanitizers --enable-fuzzer CC=clang
$ make && make -C tests fuzz
$ tests/fuzz tests/corpus-execute-command

Maintainers
-----------
libtpms is currently being maintained by Stefan Berger <stefanb@us.ibm.com>.

References:
-----------

Documentation about the Trusted Platform Module (TPM) can be downloaded
from the Trusted Computing Group's website at

http://www.trustedcomputinggroup.org