diff options
author | Juergen Repp <Juergen.Repp@sit.fraunhofer.de> | 2018-06-22 14:03:12 +0200 |
---|---|---|
committer | Tadeusz Struk <tadeusz.struk@intel.com> | 2018-07-05 11:42:47 -0700 |
commit | bebbc7ac370f65b25a3537c3ebff6b84b83c3e6b (patch) | |
tree | 96b2103f52f3d9064d649b63308fb8e4d20ca6a1 /configure.ac | |
parent | 668df38b793b8909941ce46c71e9f83f1e016127 (diff) | |
download | tpm2-tss-bebbc7ac370f65b25a3537c3ebff6b84b83c3e6b.tar.gz |
ESYS: Crypto backend for usage of openssl's libcrypto added.
* The crypto backend can be selected with the option
--with-crypto={ossl,gcrypt}.The default is gcrypt.
* Only the crypto provider independent code will remain in esys_crypto.{c,h}
The provider dependent code can be found in:
esys_crypto_{ossl,cgrypt}.{c,h}
* The provider dependent source files are removed from the lists
generated in the bootstrap script and are added explicitly
to the makefile variables in Makefile.am
Signed-off-by: Juergen Repp <Juergen.Repp@sit.fraunhofer.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index c8aa3140..d70fd69e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -#;**********************************************************************; +;**********************************************************************; # Copyright (c) 2015 - 2018 Intel Corporation # Copyright (c) 2018 Fraunhofer SIT sponsored by Infineon Technologies AG # All rights reserved. @@ -63,16 +63,48 @@ AC_ARG_ENABLE([esapi], [build the esapi layer (default is yes)])], [enable_esapi=$enableval], [enable_esapi=yes]) -AS_IF([test "x$enable_esapi" != xno], + + +AC_ARG_ENABLE([esapi], + AS_HELP_STRING([--disable-esapi], [Enable TSS ESYS API library @<:@default=yes@:>@]), + [], + [enable_esapi="yes"]) +AM_CONDITIONAL(ESAPI, test "x$enable_esapi" = "xyes") + +AC_ARG_WITH([crypto], + [AS_HELP_STRING([--with-crypto={gcrypt,ossl}], + [sets the ESAPI crypto backend (default is gcrypt)])], + [], + [with_crypto=gcrypt]) + +AM_CONDITIONAL(ESYS_OSSL, test "x$with_crypto" = "xossl") +AM_CONDITIONAL(ESYS_GCRYPT, test "x$with_crypto" = "xgcrypt") + +AS_IF([test "x$with_crypto" != "xgcrypt"], + AS_IF([test "x$with_crypto" != "xossl"], + AC_MSG_ERROR([Bad value for --with-crypto $with_crypto]))) + +AS_IF([test "x$enable_esapi" != xno -a "x$with_crypto" = "xgcrypt"], [AC_CHECK_HEADER([gcrypt.h], [], [AC_MSG_ERROR([Missing required header: gcrypt.h.])])]) -AS_IF([test "x$enable_esapi" != xno], + +AS_IF([test "x$enable_esapi" != xno -a "x$with_cryptor" = "xgcrypt"], [AC_CHECK_LIB([gcrypt], [gcry_mac_open], [], [AC_MSG_ERROR([Missing required library: gcrypt.])])]) -AM_CONDITIONAL([ESAPI], [test "x$enable_esapi" != xno]) + +AS_IF([test "x$enable_esapi" != xno -a "x$with_crypto" = "xossl"], + [AC_CHECK_HEADER([openssl/ssl.h], + [], + [AC_MSG_ERROR([Missing required header: openssl/ssl.h.])])]) + +AS_IF([test "x$enable_esapi" != xno -a "x$with_crypto" = "xossl"], + AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [FOUND_SSL_LIB="yes"])) + +AS_IF([test "x$enable_esapi" != xno -a "x$with_crypto" = "xossl"], + AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])) AC_ARG_WITH([tctidefaultmodule], [AS_HELP_STRING([--with-tctidefaultmodule], |