Skip to content

Commit

Permalink
Merge pull request #359 from dingelish/master
Browse files Browse the repository at this point in the history
Fix signature verification error in sgx_report_attestation_status and a make dependency problem
  • Loading branch information
llly authored Jan 10, 2019
2 parents bcd3c27 + dd54bf1 commit a85fbe9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -700,15 +700,21 @@ ae_error_t pib_verify_signature(platform_info_blob_wrapper_t& piBlobWrapper)
//BREAK_IF_TRUE((sizeof(publicKey) != sizeof(s_pib_pub_key_big_endian)), ae_err, AE_FAILURE);
//BREAK_IF_TRUE((sizeof(signature) != sizeof(piBlobWrapper.platform_info_blob.signature)), ae_err, AE_FAILURE);

// convert the public key to little endian
if(0!=memcpy_s(&publicKey, sizeof(publicKey), s_pib_pub_key_big_endian, sizeof(s_pib_pub_key_big_endian))){
ae_err = AE_FAILURE;
break;
}
SwapEndian_32B(((uint8_t*)&publicKey) + 0);
SwapEndian_32B(((uint8_t*)&publicKey) + 32);

// convert the signature to little endian
if(0!=memcpy_s(&signature, sizeof(signature), &piBlobWrapper.platform_info_blob.signature, sizeof(piBlobWrapper.platform_info_blob.signature))){
ae_err = AE_FAILURE;
break;
}
SwapEndian_32B(((uint8_t*)&signature) + 0);
SwapEndian_32B(((uint8_t*)&signature) + 32);

sgx_status = sgx_ecc256_open_context(&ecc_handle);
BREAK_IF_TRUE((SGX_SUCCESS != sgx_status), ae_err, AE_FAILURE);
Expand Down
2 changes: 1 addition & 1 deletion sdk/trts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $(OBJS2): %.o: %.cpp
$(CXX) -c $(TCXXFLAGS) $(CPPFLAGS) -fPIC $< -o $@

.PHONY: elf_parser
elf_parser:
elf_parser: $(OBJS)
$(MAKE) -C linux

.PHONY: clean
Expand Down

0 comments on commit a85fbe9

Please sign in to comment.