6 #include "sw/device/lib/base/status.h"
7 #include "sw/device/lib/crypto/drivers/entropy.h"
8 #include "sw/device/lib/testing/test_framework/check.h"
10 #include "sw/device/lib/testing/test_framework/ujson_ottf.h"
11 #include "sw/device/lib/ujson/ujson.h"
14 #include "sw/device/tests/penetrationtests/json/commands.h"
15 #include "sw/device/tests/penetrationtests/json/otbn_fi_commands.h"
16 #include "sw/device/tests/penetrationtests/json/pentest_lib_commands.h"
19 #include "fi/otbn_fi.h"
20 #include "lib/pentest_lib.h"
22 OTTF_DEFINE_TEST_CONFIG(.enable_uart_flow_control =
true);
26 penetrationtest_cmd_t cmd;
27 TRY(ujson_deserialize_penetrationtest_cmd_t(uj, &cmd));
29 case kPenetrationtestCommandOtbnFi:
30 RESP_ERR(uj, handle_otbn_fi(uj));
32 case kPenetrationtestCommandAlertInfo:
33 RESP_ERR(uj, pentest_read_rstmgr_alert_info(uj));
36 LOG_ERROR(
"Unrecognized command: %d", cmd);
37 RESP_ERR(uj, INVALID_ARGUMENT());
45 CHECK_STATUS_OK(entropy_complex_init());
46 ujson_t uj = ujson_ottf_console();
47 return status_ok(process_cmd(&uj));