Skip to content

Commit

Permalink
Merge pull request #145 from gowthamsiddarthd/master
Browse files Browse the repository at this point in the history
Attestation: Updating QCBOR library
  • Loading branch information
jaypit02 authored Feb 17, 2020
2 parents 65aa1ed + 1283304 commit bfcf2e3
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions api-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ set(TARGET_HEADER_GEN_INCLUDE_PATHS "${PSA_ROOT_DIR}/val/nspe|${PSA_ROOT_DIR
set(TESTSUITE_DB ${PSA_SUITE_DIR}/testsuite.db)
if(${SUITE} STREQUAL "INITIAL_ATTESTATION")
set(PSA_QCBOR_GIT_REPO_LINK https://github.com/laurencelundblade/QCBOR.git)
set(PSA_QCBOR_GIT_REPO_TAG da53227db1488dde0952bdff66c3d904dce270b3)
set(PSA_QCBOR_INCLUDE_PATH ${CMAKE_CURRENT_BINARY_DIR}/src/psa_qcbor/inc)
endif()
set(PSA_TESTLIST_FILE ${CMAKE_CURRENT_BINARY_DIR}/testlist.txt)
Expand Down Expand Up @@ -261,6 +260,9 @@ endif()

message(STATUS "[PSA] : ----------Process input arguments- complete-------------")

# Build PAL NSPE LIB
include(${PSA_ROOT_DIR}/platform/targets/${TARGET}/target.cmake)

# Create PSA clean list
list(APPEND PSA_CLEAN_LIST
${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_HEADER}
Expand Down Expand Up @@ -363,8 +365,6 @@ if(${SP_HEAP_MEM_SUPP} EQUAL 1)
add_definitions(-DSP_HEAP_MEM_SUPP)
endif()

# Build PAL NSPE LIB
include(${PSA_ROOT_DIR}/platform/targets/${TARGET}/target.cmake)
# Build VAL NSPE LIB
#add_definitions(-DVAL_NSPE_BUILD)
include(${PSA_ROOT_DIR}/val/val_nspe.cmake)
Expand Down
2 changes: 1 addition & 1 deletion api-tests/docs/sw_requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ git repository. The cloning is automated as part of the test suite cmake build:

**Repo** <br />
Name : https://github.com/laurencelundblade/QCBOR.git <br />
Commit id : da53227db1488dde0952bdff66c3d904dce270b3
Commit id : 42272e466a8472948bf8fca076d113b81b99f0e0

## License
Arm PSA test suite is distributed under Apache v2.0 License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ if(${SUITE} STREQUAL "INITIAL_ATTESTATION")
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_intf.c
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_crypto.c
)
set(PSA_QCBOR_GIT_REPO_TAG 42272e466a8472948bf8fca076d113b81b99f0e0)
endif()

# Create NSPE library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ if(${SUITE} STREQUAL "INITIAL_ATTESTATION")
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_intf.c
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_crypto.c
)
set(PSA_QCBOR_GIT_REPO_TAG 42272e466a8472948bf8fca076d113b81b99f0e0)
endif()

# Create NSPE library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ if(${SUITE} STREQUAL "INITIAL_ATTESTATION")
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_intf.c
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_crypto.c
)
set(PSA_QCBOR_GIT_REPO_TAG 42272e466a8472948bf8fca076d113b81b99f0e0)
endif()

# Create NSPE library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ if(${SUITE} STREQUAL "INITIAL_ATTESTATION")
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_intf.c
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_crypto.c
)
set(PSA_QCBOR_GIT_REPO_TAG 42272e466a8472948bf8fca076d113b81b99f0e0)
endif()

# Create NSPE library
Expand Down
1 change: 1 addition & 0 deletions api-tests/platform/targets/tgt_ff_tfm_an521/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ if(${SUITE} STREQUAL "INITIAL_ATTESTATION")
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_intf.c
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_crypto.c
)
set(PSA_QCBOR_GIT_REPO_TAG 42272e466a8472948bf8fca076d113b81b99f0e0)
endif()

# Create NSPE library
Expand Down
1 change: 1 addition & 0 deletions api-tests/platform/targets/tgt_ff_tfm_musca_a/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ if(${SUITE} STREQUAL "INITIAL_ATTESTATION")
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_intf.c
${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/initial_attestation/pal_attestation_crypto.c
)
set(PSA_QCBOR_GIT_REPO_TAG 42272e466a8472948bf8fca076d113b81b99f0e0)
endif()

# Create NSPE library
Expand Down
2 changes: 1 addition & 1 deletion api-tests/val/nspe/val_attestation.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int parse_claims(QCBORDecodeContext *decode_context, QCBORItem item,
}
}

if (status == QCBOR_ERR_HIT_END)
if (status == QCBOR_ERR_HIT_END || status == QCBOR_ERR_NO_MORE_ITEMS)
return VAL_ATTEST_SUCCESS;
else
return VAL_ATTEST_TOKEN_ERR_CBOR_FORMATTING;
Expand Down

0 comments on commit bfcf2e3

Please sign in to comment.