Commit Graph

75 Commits

Author SHA1 Message Date
Stefan Berger
83ca1948bc configure.ac: Replace tests with '==' through '='
On NetBSD configure.ac cannot have '==' in tests. So we have to replace them
with '='.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-08-29 12:12:57 +00:00
Stefan Berger
38a7d1951f pkg-config: add cryptolib to libtpms.pc
Add the cryptolib libtpms has been compiled with to libtpms.pc[.in]

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-08-03 13:06:29 -04:00
Marc-André Lureau
48dabdbdef tests: add fuzz test
See README for details on how to use.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-15 18:07:49 -04:00
Marc-André Lureau
ec0f7ed195 build-sys: move hardening linker flags to ldflags
Fixes unusued flags warnings with clang.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-15 18:07:49 -04:00
Stefan Berger
88dfea52cf tpm2: Build libtpms with TPM 2 code now
Now that patches for writing the state into files and extensions
to their headers have all been applied we can build the TPM 2
code into the library.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-06-15 18:07:48 -04:00
Stefan Berger
3cf528aaac Integrate the TPM 2 into the library; do not compile with TPM 2 yet
Introduce --with-tpm2 for ./configure to enable building with
TPM 2 functionality. Delay the building of TPM 2 code until more
patches are applied and the vTPM state that's created has a chance
of being backwards compatible.

Extend the libtpms API to allow user to choose version of TPM.

Missing functionality at this point:
- TPM 2 needs to be extended to serialize and deserialize its volatile state
- Handling of the establishment bit

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-06-15 18:07:47 -04:00
Stefan Berger
b19b6ed343 Fix compilation errors in the TPM 2 code
Fix compilation errors in the TPM 2 code.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-06-15 18:07:47 -04:00
Stefan Berger
ccce8b5f49 Add TPM 2 code
Add TPM 2 code.

This is rev. 142 code.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-06-15 18:07:47 -04:00
Stefan Berger
d9d83de2d3 build-sys: Add AC_CONFIG_AUX_DIR to configure.ac
The Travis build of swtpm now has a problem due to missing ltmain.sh. Add
AC_CONFIG_AUX_DIR to configure.ac to resolve the issue.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-05-27 20:37:34 -04:00
Stefan Berger
1279e39eb8 build: Only add -Wall -Werror etc. if user did not set CFLAGS explicitly
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-10-12 12:46:34 -04:00
Stefan Berger
a1cde166f9 build: disable -Wstack-protector
Some version of gcc fail with -Wstack-protector due to some functions
not being protectable. Disable this option.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2016-01-12 15:40:32 -05:00
Stefan Berger
23b958af05 Move TPM1.2 code to src/tpm12 directory
Move all TPM1.2 code to src/tpm12 directory. Adapt the Makefile.am
to point to tpm12 directory for the TPM1.2 sources.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-12-07 19:14:30 -05:00
Stefan Berger
61ee460356 Version bump to 0.6.0
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-12-07 19:14:30 -05:00
Stefan Berger
769fb37a25 build: Simplify the check for -fstack-protector-strong
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-10-26 11:28:25 -04:00
Stefan Berger
3251bfba69 build: Check for -fstack-protector-strong before using it
Import AX_CHECK_COMPILE_FLAG to help check for compiler option
-fstack-protector-strong.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-10-26 09:50:46 -04:00
Stefan Berger
384bf2e2a7 build: Disable volatile storage debug for debug build
Disable the volatile storage debug for a debug build since this
causes the volatile state file to be written and this changes
the behavior upon a restart of the TPM. This may cause the TPM to
not work correctly then.

Print out some more build parameters.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-05-01 21:15:46 -04:00
Stefan Berger
40e13951a9 build: do not set -D_FORTIFY_SOURCE=2 when -O0 is set or -O is missing
-D_FORTIFY_SOURCE needs optimization, so we do not set it if -O0 is
set or -O is missing.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-05-01 12:07:21 -04:00
Stefan Berger
4461f8a74e Add LT_INIT to configure.ac
Add missing LT_INIT to configure.ac.
2015-04-29 10:29:01 -04:00
Stefan Berger
793852f1a5 Add relro and now to hardening cflags, if available
Check ld for availability of relro and now flags and add them to the
hardening cflags if available.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-02-03 14:06:46 -05:00
Stefan Berger
bfb1c7739a Use hardening CFLAGS
Add hardening CFLAGS -D_FORTIFY_SOURCE=2 and stack protector.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-02-02 06:58:59 -05:00
Stefan Berger
893d9b9528 Check for missing freebl headers and freebl lib
Add a check for missing freebl header blapi.h (missing in Ubuntu)
and missing freebl static library that provides AES_CreateContext.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2014-12-18 10:44:08 -05:00
Stefan Berger
03d25ba067 Make compileable on Ubuntu and docu for Ubuntu
Ubuntu has different package names that need to be documented separtely.
Ubuntu requires exec_prefix in the libtpms.pc file for pkg-config to work.
Rework some of the configure.ac parts.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2014-12-15 22:10:07 -05:00
Stefan Berger
fd8aa8c36f Catch missing nss-devel and nspr-devel dependencies
Catch nspr-config and nss-config dependencies in te configure script.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2014-07-03 17:38:34 -04:00
Stefan Berger
ff5fac41e4 Create version 0.5.2
Set the version of the library to 0.5.2.
Synchronize the rpm spec with the one used in Fedora and set the release
version to 1.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2014-06-30 15:04:15 -04:00
Stefan Berger
017c810393 Use boostrap.sh to build rpm on Fedora machines
Use bootstrap.sh before running configure when building an rpm.
Reorder the tools in bootstrap.sh to avoid error messages.

Rename configure.in to configure.ac to quite down more recent autotools.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
2014-01-21 14:21:36 -06:00