Showing with 1,460 additions and 1,478 deletions.
  1. +0 −82 .travis.yml
  2. +60 −45 Makefile.am
  3. +0 −277 lib/context-util.c
  4. +0 −47 lib/context-util.h
  5. +0 −421 lib/options.c
  6. +0 −163 lib/options.h
  7. +66 −0 lib/tcti/tpm2_tools_tcti_abrmd.c
  8. +48 −0 lib/tcti/tpm2_tools_tcti_abrmd.h
  9. +83 −0 lib/tcti/tpm2_tools_tcti_device.c
  10. +47 −0 lib/tcti/tpm2_tools_tcti_device.h
  11. +111 −0 lib/tcti/tpm2_tools_tcti_socket.c
  12. +47 −0 lib/tcti/tpm2_tools_tcti_socket.h
  13. +364 −0 lib/tpm2_options.c
  14. +176 −0 lib/tpm2_options.h
  15. +2 −0 lib/tpm2_util.h
  16. +0 −104 tools/main.c
  17. +90 −123 tools/tpm2_activatecredential.c
  18. +2 −2 tools/tpm2_akparse.c
  19. +2 −2 tools/tpm2_certify.c
  20. +9 −17 tools/tpm2_create.c
  21. +2 −2 tools/tpm2_createpolicy.c
  22. +6 −6 tools/tpm2_createprimary.c
  23. +2 −2 tools/tpm2_dictionarylockout.c
  24. +1 −1 tools/tpm2_dump_capability.c
  25. +2 −2 tools/tpm2_encryptdecrypt.c
  26. +2 −2 tools/tpm2_evictcontrol.c
  27. +2 −2 tools/tpm2_getmanufec.c
  28. +2 −2 tools/tpm2_getpubak.c
  29. +1 −1 tools/tpm2_getpubek.c
  30. +2 −2 tools/tpm2_getrandom.c
  31. +72 −87 tools/tpm2_hash.c
  32. +5 −5 tools/tpm2_hmac.c
  33. +2 −2 tools/tpm2_listpersistent.c
  34. +6 −6 tools/tpm2_load.c
  35. +2 −2 tools/tpm2_loadexternal.c
  36. +2 −2 tools/tpm2_makecredential.c
  37. +2 −2 tools/tpm2_nvdefine.c
  38. +2 −2 tools/tpm2_nvlist.c
  39. +2 −2 tools/tpm2_nvread.c
  40. +2 −2 tools/tpm2_nvreadlock.c
  41. +2 −2 tools/tpm2_nvrelease.c
  42. +2 −2 tools/tpm2_nvwrite.c
  43. +5 −5 tools/tpm2_pcrevent.c
  44. +2 −2 tools/tpm2_pcrextend.c
  45. +11 −11 tools/tpm2_pcrlist.c
  46. +1 −1 tools/tpm2_quote.c
  47. +1 −1 tools/tpm2_rc_decode.c
  48. +2 −2 tools/tpm2_readpublic.c
  49. +2 −2 tools/tpm2_rsadecrypt.c
  50. +2 −2 tools/tpm2_rsaencrypt.c
  51. +1 −1 tools/tpm2_send_command.c
  52. +2 −2 tools/tpm2_sign.c
  53. +1 −1 tools/tpm2_startup.c
  54. +2 −2 tools/tpm2_takeownership.c
  55. +156 −0 tools/tpm2_tool.c
  56. +39 −21 tools/{main.h → tpm2_tool.h}
  57. +1 −2 tools/tpm2_unseal.c
  58. +2 −2 tools/tpm2_verifysignature.c
82 changes: 0 additions & 82 deletions .travis.yml

This file was deleted.

105 changes: 60 additions & 45 deletions Makefile.am
Expand Up @@ -32,7 +32,7 @@

ACLOCAL_AMFLAGS = -I m4

INCLUDE_DIRS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
INCLUDE_DIRS = -I$(top_srcdir)/src -I$(top_srcdir)/lib -I$(top_srcdir)/lib/tcti
LIB_COMMON := lib/libcommon.a

AM_CFLAGS := \
Expand All @@ -45,58 +45,71 @@ LDADD = \
$(LIB_COMMON) $(SAPI_LIBS) $(TCTI_SOCK_LIBS) $(TCTI_TABRMD_LIBS) \
$(TCTI_DEV_LIBS) $(CRYPTO_LIBS)

# keep me sorted
bin_PROGRAMS = \
tools/tpm2_create \
tools/tpm2_createprimary \
tools/tpm2_load \
tools/tpm2_send_command \
tools/tpm2_dump_capability \
tools/tpm2_pcrlist \
tools/tpm2_listpersistent \
tools/tpm2_startup \
tools/tpm2_rc_decode \
tools/tpm2_verifysignature \
tools/tpm2_getmanufec \
tools/tpm2_quote \
tools/tpm2_takeownership \
tools/tpm2_getpubek \
tools/tpm2_getpubak \
tools/tpm2_akparse \
tools/tpm2_hash \
tools/tpm2_activatecredential \
tools/tpm2_makecredential \
tools/tpm2_nvlist \
tools/tpm2_nvread \
tools/tpm2_nvreadlock \
tools/tpm2_nvwrite \
tools/tpm2_nvdefine \
tools/tpm2_nvrelease \
tools/tpm2_hmac \
tools/tpm2_certify \
tools/tpm2_readpublic \
tools/tpm2_getrandom \
tools/tpm2_encryptdecrypt \
tools/tpm2_evictcontrol \
tools/tpm2_loadexternal \
tools/tpm2_rsadecrypt \
tools/tpm2_rsaencrypt \
tools/tpm2_sign \
tools/tpm2_unseal \
tools/tpm2_dictionarylockout \
tools/tpm2_createpolicy \
tools/tpm2_pcrextend \
tools/tpm2_pcrevent
tools/tpm2_hash

# NEED TO PORT
# tools/tpm2_akparse \
# tools/tpm2_certify \
# tools/tpm2_create \
# tools/tpm2_createpolicy \
# tools/tpm2_createprimary \
# tools/tpm2_dictionarylockout \
# tools/tpm2_dump_capability \
# tools/tpm2_encryptdecrypt \
# tools/tpm2_evictcontrol \
# tools/tpm2_getmanufec \
# tools/tpm2_getpubak \
# tools/tpm2_getpubek \
# tools/tpm2_getrandom \
# tools/tpm2_hash \
# tools/tpm2_hmac \
# tools/tpm2_listpersistent \
# tools/tpm2_load \
# tools/tpm2_loadexternal \
# tools/tpm2_makecredential \
# tools/tpm2_nvdefine \
# tools/tpm2_nvlist \
# tools/tpm2_nvread \
# tools/tpm2_nvreadlock \
# tools/tpm2_nvrelease \
# tools/tpm2_nvwrite \
# tools/tpm2_pcrevent \
# tools/tpm2_pcrextend \
# tools/tpm2_pcrlist \
# tools/tpm2_quote \
# tools/tpm2_rc_decode \
# tools/tpm2_readpublic \
# tools/tpm2_rsadecrypt \
# tools/tpm2_rsaencrypt \
# tools/tpm2_send_command \
# tools/tpm2_sign \
# tools/tpm2_startup \
# tools/tpm2_takeownership \
# tools/tpm2_unseal \
# tools/tpm2_verifysignature

tcti_src = ""
if HAVE_TCTI_DEV
tcti_src += lib/tcti/tpm2_tools_tcti_device.c
endif
if HAVE_TCTI_SOCK
tcti_src += lib/tcti/tpm2_tools_tcti_socket.c
endif
if HAVE_TCTI_TABRMD
tcti_src += lib/tcti/tpm2_tools_tcti_abrmd.c
endif


noinst_LIBRARIES = $(LIB_COMMON)
lib_libcommon_a_SOURCES = \
lib/context-util.c \
lib/context-util.h \
$(tcti_src) \
lib/files.c \
lib/files.h \
lib/log.c \
lib/log.h \
lib/options.c \
lib/options.h \
lib/pcr.c \
lib/pcr.h \
lib/rc-decode.c \
Expand All @@ -118,10 +131,12 @@ lib_libcommon_a_SOURCES = \
lib/tpm_hmac.h \
lib/tpm_kdfa.c \
lib/tpm_kdfa.h \
lib/tpm2_options.c \
lib/tpm2_options.h \
lib/tpm_session.c \
lib/tpm_session.h

TOOL_SRC := tools/main.c tools/main.h
TOOL_SRC := tools/tpm2_tool.c tools/tool.h

tools_tpm2_create_SOURCES = tools/tpm2_create.c $(TOOL_SRC)
tools_tpm2_createprimary_SOURCES = tools/tpm2_createprimary.c $(TOOL_SRC)
Expand Down