Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small astyle and whitespace refactor #1

Open
wants to merge 2 commits into
base: attestation_example
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,15 @@
if((actual) != (expected)) \
{ \
mbedtls_printf( "\tassertion failed at %s:%d - " \
"actual:%" PRId32 "expected:%" PRId32 "\n", \
"actual:%" PRId32 "expected:%" PRId32 "\n", \
__FILE__, __LINE__, \
(psa_status_t) actual, (psa_status_t) expected ); \
goto exit; \
} \
} while (0)

#if !defined(MBEDTLS_PSA_CRYPTO_C)
int main(void)
{
mbedtls_printf("Not all of the required options are defined:\n"
" - MBEDTLS_PSA_CRYPTO_C\n");
return 0;
}
#error "Not all of the required options are defined: Missing MBEDTLS_PSA_CRYPTO_C"
kegilbert marked this conversation as resolved.
Show resolved Hide resolved
#else

#define PSA_ATTESTATION_PRIVATE_KEY_ID 17
Expand Down Expand Up @@ -120,8 +115,9 @@ static psa_status_t check_initial_attestation_get_token()
ASSERT_STATUS(attest_err, PSA_ATTEST_ERR_SUCCESS);

exit:
if(attest_err != PSA_ATTEST_ERR_SUCCESS)
if (attest_err != PSA_ATTEST_ERR_SUCCESS) {
return attest_err;
}
return status;
}

Expand Down Expand Up @@ -170,7 +166,7 @@ int main(void)
psa_key_handle_t handle = 0;

fake_set_initial_nvseed();

attestation_example();

psa_open_key(PSA_KEY_LIFETIME_PERSISTENT, key_id, &handle);
Expand Down