Fix the dprintf call to use a format parameter that otherwise causes
errors with gcc on certain platforms.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Fix compilation problems like the following:
/usr/local/lib/libtpms.so: undefined reference to `va_start'
/usr/local/lib/libtpms.so: undefined reference to `va_end'
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
vdprintf with a NULL parameter on the 3rd position crashes
on Linux. Replace it with dprintf.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Add API calls TPMLIB_SetDebugFD(), TPMLIB_SetDebugLevel(),
TPMLIB_SetDebugPrefix().
Convert the internal printing of debugging strings to
correspond to the log level. Print the prefix in front
of every line.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Use 'rpmbuild -ba --define "crypto_subsystem openssl" dist/libtpms.spec'
to build libtpms with openssl.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Add debian build files to enable building of Debian package using for example
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>
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>
Introduce an internal interface that allows us to reach TPM functionality
from the libary's API layer. This prepares the code for the addition
of a new API function that lets us choose which TPM to use, TPM 1.2 or
TPM2. Currently only TPM 1.2 functionality is available.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
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>
Add a virtual provide libtpms-freebl or libtpms-openssl to
indicate which crypto library libtpms is using.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
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>
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>
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>
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>
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>
Fix support for ARM64 by testing for whether __aarch64__ is defined.
Also see http://sourceforge.net/p/predef/wiki/Architectures for the
gcc preprocessor defines.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
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>
Sync the libtpms.spec.in with the content in the Fedora repository.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Joel Schopp <jschopp@linux.vnet.ibm.com>