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

Fix signature verification error in sgx_report_attestation_status and a make dependency problem #359

Merged
merged 2 commits into from
Jan 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
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