Skip to content

Commit

Permalink
some indentation; remove cmake; tidy up some variable definitions
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Vavala <[email protected]>
  • Loading branch information
bvavala committed Nov 5, 2024
1 parent 794d664 commit 115d440
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 45 deletions.
8 changes: 4 additions & 4 deletions common/crypto/attestation-api/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ SET(JWT_PATCHED_FILEPATH ${CMAKE_CURRENT_SOURCE_DIR}/${JWT_PATCHED_FILENAME} PAR
ADD_CUSTOM_COMMAND(
OUTPUT ${JWT_PATCHED_FILENAME}
COMMAND [ ! -f ${JWT_PATCHED_FILENAME} ] && cd jwt-cpp && patch -f -p1 < ../jwt-cpp.patch && touch ../${JWT_PATCHED_FILENAME} || true
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

ADD_CUSTOM_TARGET(patch_jwt DEPENDS ${JWT_PATCHED_FILENAME})

# TODO: devise better strategy for clean up; usually the build folder is removed so the clean is not called
ADD_CUSTOM_TARGET(clean_patch_jwt
COMMAND [ -f ${JWT_PATCHED_FILENAME} ] && cd jwt-cpp && patch -f -p1 -R < ../jwt-cpp.patch && rm ../${JWT_PATCHED_FILENAME}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

15 changes: 0 additions & 15 deletions common/crypto/attestation-api/common/Makefile

This file was deleted.

22 changes: 0 additions & 22 deletions common/crypto/attestation-api/common/_yeslogging/Makefile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ void deserialize_collateral(uint8_t* p)
bool verify_dcap_direct_evidence(ByteArray& evidence, ByteArray& expected_statement, ByteArray& expected_code_id)
{
ByteArray quote;
ByteArray certification_data;
uint32_t certification_data_size;
uint16_t certification_data_type;
ByteArray collateral;
time_t untrusted_time;
bool b;
Expand All @@ -73,7 +70,7 @@ bool verify_dcap_direct_evidence(ByteArray& evidence, ByteArray& expected_statem
CATCH(b, root = json::parse(evidence_str));
COND2LOGERR(!b, "bad dcap evidence json");

//get attestation
//get attestation/quote
std::string b64attestation_str;
std::string attestation_str;
CATCH(b, b64attestation_str = root[ATTESTATION_TAG].template get<std::string>());
Expand Down Expand Up @@ -114,6 +111,10 @@ bool verify_dcap_direct_evidence(ByteArray& evidence, ByteArray& expected_statem

//verify quote
{
ByteArray certification_data;
uint32_t certification_data_size;
uint16_t certification_data_type;

qvl_status = sgxAttestationGetQECertificationDataSize(quote.data(), quote.size(), &certification_data_size);
COND2LOGERR(qvl_status != STATUS_OK,
"error certification data size: %x", qvl_status);
Expand Down

0 comments on commit 115d440

Please sign in to comment.