/* * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include #include #include #include #include #include #include #include #include "attest_report_fetcher.h" int main(int argc, char *argv[]) { int rval = -1; psa_status_t psa_status = psa_crypto_init(); if (psa_status != PSA_SUCCESS) { printf("psa_crypto_init failed: %d\n", psa_status); return rval; } service_locator_init(); /* Fetch platform info */ std::string error_msg; std::vector attest_report; if (fetch_attest_report(attest_report, error_msg)) { rval = pretty_report_dump(attest_report.data(), attest_report.size()); } else { printf("%s\n", error_msg.c_str()); } return rval; }