Showing with 4,871 additions and 5,754 deletions.
  1. +0 −82 .travis.yml
  2. +43 −33 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. +372 −0 lib/tpm2_options.c
  14. +176 −0 lib/tpm2_options.h
  15. +2 −0 lib/tpm2_util.h
  16. +4 −13 man/tpm2_startup.8.in
  17. +2 −2 test/system/test_tpm2_startup.sh
  18. +0 −104 tools/main.c
  19. +103 −129 tools/tpm2_activatecredential.c
  20. +30 −54 tools/tpm2_akparse.c
  21. +126 −165 tools/tpm2_certify.c
  22. +232 −259 tools/tpm2_create.c
  23. +84 −113 tools/tpm2_createpolicy.c
  24. +180 −187 tools/tpm2_createprimary.c
  25. +74 −114 tools/tpm2_dictionarylockout.c
  26. +68 −99 tools/tpm2_dump_capability.c
  27. +109 −138 tools/tpm2_encryptdecrypt.c
  28. +86 −124 tools/tpm2_evictcontrol.c
  29. +155 −181 tools/tpm2_getmanufec.c
  30. +126 −156 tools/tpm2_getpubak.c
  31. +88 −121 tools/tpm2_getpubek.c
  32. +34 −52 tools/tpm2_getrandom.c
  33. +72 −87 tools/tpm2_hash.c
  34. +114 −150 tools/tpm2_hmac.c
  35. +5 −15 tools/tpm2_listpersistent.c
  36. +127 −147 tools/tpm2_load.c
  37. +59 −90 tools/tpm2_loadexternal.c
  38. +70 −101 tools/tpm2_makecredential.c
  39. +97 −122 tools/tpm2_nvdefine.c
  40. +4 −8 tools/tpm2_nvlist.c
  41. +96 −116 tools/tpm2_nvread.c
  42. +65 −90 tools/tpm2_nvreadlock.c
  43. +67 −86 tools/tpm2_nvrelease.c
  44. +81 −100 tools/tpm2_nvwrite.c
  45. +104 −113 tools/tpm2_pcrevent.c
  46. +27 −30 tools/tpm2_pcrextend.c
  47. +160 −147 tools/tpm2_pcrlist.c
  48. +126 −172 tools/tpm2_quote.c
  49. +121 −134 tools/tpm2_rc_decode.c
  50. +67 −84 tools/tpm2_readpublic.c
  51. +95 −116 tools/tpm2_rsadecrypt.c
  52. +74 −96 tools/tpm2_rsaencrypt.c
  53. +40 −43 tools/tpm2_send_command.c
  54. +136 −160 tools/tpm2_sign.c
  55. +37 −92 tools/tpm2_startup.c
  56. +85 −108 tools/tpm2_takeownership.c
  57. +158 −0 tools/tpm2_tool.c
  58. +39 −21 tools/{main.h → tpm2_tool.h}
  59. +111 −134 tools/tpm2_unseal.c
  60. +138 −158 tools/tpm2_verifysignature.c
82 changes: 0 additions & 82 deletions .travis.yml

This file was deleted.

76 changes: 43 additions & 33 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,68 @@ LDADD = \
$(LIB_COMMON) $(SAPI_LIBS) $(TCTI_SOCK_LIBS) $(TCTI_TABRMD_LIBS) \
$(TCTI_DEV_LIBS) $(CRYPTO_LIBS)

# keep me sorted
bin_PROGRAMS = \
tools/tpm2_activatecredential \
tools/tpm2_akparse \
tools/tpm2_certify \
tools/tpm2_create \
tools/tpm2_createpolicy \
tools/tpm2_createprimary \
tools/tpm2_load \
tools/tpm2_send_command \
tools/tpm2_dictionarylockout \
tools/tpm2_dump_capability \
tools/tpm2_pcrlist \
tools/tpm2_listpersistent \
tools/tpm2_startup \
tools/tpm2_rc_decode \
tools/tpm2_verifysignature \
tools/tpm2_encryptdecrypt \
tools/tpm2_evictcontrol \
tools/tpm2_getmanufec \
tools/tpm2_quote \
tools/tpm2_takeownership \
tools/tpm2_getpubek \
tools/tpm2_getpubak \
tools/tpm2_akparse \
tools/tpm2_getpubek \
tools/tpm2_getrandom \
tools/tpm2_hash \
tools/tpm2_activatecredential \
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_nvwrite \
tools/tpm2_nvdefine \
tools/tpm2_nvrelease \
tools/tpm2_hmac \
tools/tpm2_certify \
tools/tpm2_nvwrite \
tools/tpm2_pcrevent \
tools/tpm2_pcrextend \
tools/tpm2_pcrlist \
tools/tpm2_quote \
tools/tpm2_rc_decode \
tools/tpm2_readpublic \
tools/tpm2_getrandom \
tools/tpm2_encryptdecrypt \
tools/tpm2_evictcontrol \
tools/tpm2_loadexternal \
tools/tpm2_rsadecrypt \
tools/tpm2_rsaencrypt \
tools/tpm2_send_command \
tools/tpm2_sign \
tools/tpm2_startup \
tools/tpm2_takeownership \
tools/tpm2_unseal \
tools/tpm2_dictionarylockout \
tools/tpm2_createpolicy \
tools/tpm2_pcrextend \
tools/tpm2_pcrevent
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 +128,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 Expand Up @@ -164,9 +176,7 @@ tools_tpm2_dictionarylockout_SOURCES = tools/tpm2_dictionarylockout.c $(TOOL_SRC
tools_tpm2_createpolicy_SOURCES = tools/tpm2_createpolicy.c $(TOOL_SRC)
tools_tpm2_pcrextend_SOURCES = tools/tpm2_pcrextend.c $(TOOL_SRC)
tools_tpm2_pcrevent_SOURCES = tools/tpm2_pcrevent.c $(TOOL_SRC)

# rc_decode does not use common main, since it does not need a dynamic TCTI.
tools_tpm2_rc_decode_SOURCES = lib/rc-decode.c tools/tpm2_rc_decode.c
tools_tpm2_rc_decode_SOURCES = tools/tpm2_rc_decode.c $(TOOL_SRC)

if UNIT
TESTS = $(check_PROGRAMS)
Expand Down