merge conflicts.

This commit is contained in:
christos 2019-01-07 15:43:04 +00:00
parent 8cc77b481a
commit 71d1bfd50f
8 changed files with 15 additions and 181 deletions

View File

@ -1,160 +0,0 @@
#
# configure.in
#
# The Initial Developer of the Original Code is International
# Business Machines Corporation. Portions created by IBM
# Corporation are Copyright (C) 2005, 2006 International Business
# Machines Corporation. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the Common Public License as published by
# IBM Corporation; either version 1 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Common Public License for more details.
#
# You should have received a copy of the Common Public License
# along with this program; if not, a copy can be viewed at
# http://www.opensource.org/licenses/cpl1.0.php.
#
AC_INIT(tpm-tools, 1.3.7, trousers-tech@lists.sf.net)
AC_PREREQ(2.12)dnl
AC_CONFIG_SRCDIR(Makefile.am)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([foreign 1.6])
DEBUG=""
AC_MSG_CHECKING([for debug-enabled build])
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [create a debug build that outputs debug messages]),
[if test "$enableval" = "yes"; then
DEBUG="yes"
AC_MSG_RESULT([yes])
else
DEBUG="no"
AC_MSG_RESULT([no])
fi],
[DEBUG="no"
AC_MSG_RESULT([no])])
# If the user has not set CFLAGS, do something appropriate
test_CFLAGS=${CFLAGS+set}
if test "$test_CFLAGS" != set; then
if test "$DEBUG" == "yes"; then
CFLAGS="-O0 -g -DDEBUG"
else
CFLAGS="-g -O2"
fi
elif test "$DEBUG" == "yes"; then
CFLAGS="$CFLAGS -O0 -g -DDEBUG"
fi
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_CHECK_PROGS(COPY, cp)
AC_CHECK_PROGS(ECHO, echo)
AC_CHECK_PROGS(MKDIR, mkdir)
AC_CHECK_PROGS(RM, rm)
AM_GNU_GETTEXT_VERSION([0.15])
AM_GNU_GETTEXT([external])
# Arch specific stuff
case $target in
*ppc64* | *powerpc64* | *x86_64* | *s390x*)
CFLAGS="$CFLAGS -m64"
;;
*)
;;
esac
# Non-standard OpenSSL location
AC_MSG_CHECKING([Non-standard OpenSSL location])
AC_ARG_WITH(openssl,
AC_HELP_STRING([--with-openssl=PATH], [Location of openssl libs/includes]),
[OPENSSL_INCLUDE_DIR="$withval/include"
OPENSSL_LIB_DIR="$withval/lib"
if test ! -d $OPENSSL_INCLUDE_DIR -o ! -d $OPENSSL_LIB_DIR; then
AC_MSG_ERROR([$OPENSSL_INCLUDE_DIR or $OPENSSL_LIB_DIR doen't exist!])
else
AC_MSG_RESULT([yes])
CFLAGS="$CFLAGS -L$OPENSSL_LIB_DIR -I$OPENSSL_INCLUDE_DIR"
AC_SUBST([OPENSSL_LIB_DIR])
fi],
[AC_MSG_RESULT([no])
AC_SUBST([OPENSSL_LIB_DIR], []) ] )
AC_CHECK_LIB(tspi, Tspi_Context_Create, [TSS_LIB="1"], [AC_MSG_ERROR([tss lib not found: libtspi.so])])
AC_CHECK_LIB(tspi, Tspi_TPM_SetOperatorAuth, [TSS_12="1"], [TSS_12="0"])
if test "$TSS_12" = "1"; then
AM_CONDITIONAL(TSS_LIB_IS_12, true)
AC_MSG_NOTICE([Configuring tpm-tools for TSS 1.2])
else
AM_CONDITIONAL(TSS_LIB_IS_12, false)
AC_MSG_NOTICE([Configuring tpm-tools for TSS 1.1])
fi
AC_CHECK_HEADER(trousers/tss.h, [TSS_INC="1"], [AC_MSG_ERROR([tss header not found: trousers/tss.h])])
AC_CHECK_LIB(crypto, PEM_read_X509, [OPENSSL_LIB="1"], [AC_MSG_ERROR([openssl lib not found: libcrypto.so])])
AC_CHECK_HEADER(openssl/evp.h, [OPENSSL_INC="1"], [AC_MSG_ERROR([openssl header not found: openssl/evp.h])])
OPENCRYPTOKI="1"
AC_ARG_ENABLE(pkcs11_support,
AC_HELP_STRING([--disable-pkcs11-support], [don't build data_mgmt commands [[default=no]]]),
[disable_pkcs11_support="yes"
AC_MSG_RESULT([*** Not building data_mgmt at user request ***])],)
if test "x$disable_pkcs11_support" != "xyes"; then
AC_CHECK_HEADER(opencryptoki/pkcs11.h, [OPENCRYPTOKI_INC="1"], [OPENCRYPTOKI_INC="0"])
if test "$OPENCRYPTOKI_INC" = "1"; then
OPENCRYPTOKI="1"
fi
fi
AM_CONDITIONAL([P11_SUPPORT], [test "$OPENCRYPTOKI" = "1"])
AC_HEADER_STDC
AC_C_CONST
AC_C_INLINE
AC_SYS_LONG_FILE_NAMES
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AC_TYPE_UID_T
CFLAGS="$CFLAGS -Wall -Werror -Wreturn-type -Wsign-compare"
AC_CONFIG_FILES(./Makefile \
po/Makefile.in \
m4/Makefile \
include/Makefile \
lib/Makefile \
src/Makefile \
src/tpm_mgmt/Makefile \
src/cmds/Makefile \
src/data_mgmt/Makefile \
dist/tpm-tools.spec \
man/Makefile \
man/man1/Makefile \
man/man3/Makefile \
man/man8/Makefile)
AC_OUTPUT
echo "CFLAGS=$CFLAGS"
echo "LDFLAGS=$LDFLAGS"

View File

@ -44,7 +44,7 @@ libtpm_utils_la_SOURCES = tpm_utils.c \
#
# TSPI interface library
libtpm_tspi_la_SOURCES = tpm_tspi.c
libtpm_tspi_la_LIBADD = libtpm_utils.la
libtpm_tspi_la_LIBADD = libtpm_utils.la @INTLLIBS@
#
# PKCS#11 interface library
@ -52,7 +52,7 @@ if P11_SUPPORT
noinst_LTLIBRARIES += libtpm_pkcs11.la
libtpm_pkcs11_la_SOURCES= tpm_pkcs11.c
libtpm_pkcs11_la_LIBADD = libtpm_utils.la
libtpm_pkcs11_la_LIBADD = libtpm_utils.la @INTLLIBS@
endif
#
@ -80,4 +80,4 @@ endif
# Unseal library - for addition to existing apps, counter part of seal cmd
libtpm_unseal_la_SOURCES = tpm_unseal.c
libtpm_unseal_la_LDFLAGS = -shared -version-info 1:0:0
libtpm_unseal_la_LIBADD = -ltspi libtpm_tspi.la
libtpm_unseal_la_LIBADD = -ltspi libtpm_tspi.la -lcrypto @INTLLIBS@

View File

@ -72,7 +72,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@ -156,7 +156,6 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO = @ECHO@
@ -189,7 +188,6 @@ LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
@ -207,7 +205,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
@ -225,7 +222,6 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@ -260,6 +256,7 @@ libexecdir = @libexecdir@
# Gettext support
localedir = $(datadir)/locale
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@ -298,9 +295,9 @@ libtpm_utils_la_SOURCES = tpm_utils.c \
#
# TSPI interface library
libtpm_tspi_la_SOURCES = tpm_tspi.c
libtpm_tspi_la_LIBADD = libtpm_utils.la
libtpm_tspi_la_LIBADD = libtpm_utils.la @INTLLIBS@
@P11_SUPPORT_TRUE@libtpm_pkcs11_la_SOURCES = tpm_pkcs11.c
@P11_SUPPORT_TRUE@libtpm_pkcs11_la_LIBADD = libtpm_utils.la
@P11_SUPPORT_TRUE@libtpm_pkcs11_la_LIBADD = libtpm_utils.la @INTLLIBS@
#
# Installed Libraries
@ -327,7 +324,7 @@ libtpm_tspi_la_LIBADD = libtpm_utils.la
# Unseal library - for addition to existing apps, counter part of seal cmd
libtpm_unseal_la_SOURCES = tpm_unseal.c
libtpm_unseal_la_LDFLAGS = -shared -version-info 1:0:0
libtpm_unseal_la_LIBADD = -ltspi libtpm_tspi.la
libtpm_unseal_la_LIBADD = -ltspi libtpm_tspi.la -lcrypto @INTLLIBS@
all: all-am
.SUFFIXES:

View File

@ -1 +0,0 @@
timestamp

View File

@ -38,7 +38,7 @@ noinst_HEADERS = data_common.h \
# Common build flags
AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX
LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi
LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi @INTLLIBS@
#

View File

@ -73,7 +73,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@ -142,7 +142,6 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO = @ECHO@
@ -175,7 +174,6 @@ LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
@ -193,7 +191,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
@ -211,7 +208,6 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@ -244,6 +240,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@ -274,7 +271,7 @@ noinst_HEADERS = data_common.h \
#
# Common build flags
AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX
LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi
LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi @INTLLIBS@
#
# TPM Token initialization command

View File

@ -140,8 +140,8 @@ int parseStringWithValues(const char *aArg,
aArg);
return -1;
}
if (!aArg[offset+numbytes] == '|' &&
!aArg[offset+numbytes] == 0) {
if (aArg[offset+numbytes] == '|' ||
aArg[offset+numbytes] == 0) {
logError(_("Illegal character following "
"hexadecimal number in %s\n"),
aArg + offset);

View File

@ -24,6 +24,7 @@
#include <ctype.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include "tpm_nvcommon.h"
#include "tpm_tspi.h"