# A trust boundary for meter uploads: a parser that never reads outside
# its input and accepts only what it fully understands, a secret type
# that does not print or compare early, narrow ports that give the
# gateway only the powers it needs, and a gateway that fails closed.
add_library(adv_input_boundary STATIC packet.cpp secret.cpp gateway.cpp adapters.cpp)
target_include_directories(adv_input_boundary PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

lld_add_example(adv_input_boundary_demo SOURCES main.cpp EXPECTED_OUTPUT expected_output.txt)
target_link_libraries(adv_input_boundary_demo PRIVATE adv_input_boundary)

lld_add_test(adv_input_boundary_tests
  SOURCES tests/test_parser.cpp tests/test_secret.cpp tests/test_gateway.cpp)
target_link_libraries(adv_input_boundary_tests PRIVATE adv_input_boundary)
