Skip to content

Commit a85fbe9

Browse files
authored
Merge pull request #359 from dingelish/master
Fix signature verification error in sgx_report_attestation_status and a make dependency problem
2 parents bcd3c27 + dd54bf1 commit a85fbe9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

psw/ae/aesm_service/source/upse/u_certificate_provisioning.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,15 +700,21 @@ ae_error_t pib_verify_signature(platform_info_blob_wrapper_t& piBlobWrapper)
700700
//BREAK_IF_TRUE((sizeof(publicKey) != sizeof(s_pib_pub_key_big_endian)), ae_err, AE_FAILURE);
701701
//BREAK_IF_TRUE((sizeof(signature) != sizeof(piBlobWrapper.platform_info_blob.signature)), ae_err, AE_FAILURE);
702702

703+
// convert the public key to little endian
703704
if(0!=memcpy_s(&publicKey, sizeof(publicKey), s_pib_pub_key_big_endian, sizeof(s_pib_pub_key_big_endian))){
704705
ae_err = AE_FAILURE;
705706
break;
706707
}
708+
SwapEndian_32B(((uint8_t*)&publicKey) + 0);
709+
SwapEndian_32B(((uint8_t*)&publicKey) + 32);
707710

711+
// convert the signature to little endian
708712
if(0!=memcpy_s(&signature, sizeof(signature), &piBlobWrapper.platform_info_blob.signature, sizeof(piBlobWrapper.platform_info_blob.signature))){
709713
ae_err = AE_FAILURE;
710714
break;
711715
}
716+
SwapEndian_32B(((uint8_t*)&signature) + 0);
717+
SwapEndian_32B(((uint8_t*)&signature) + 32);
712718

713719
sgx_status = sgx_ecc256_open_context(&ecc_handle);
714720
BREAK_IF_TRUE((SGX_SUCCESS != sgx_status), ae_err, AE_FAILURE);

sdk/trts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ $(OBJS2): %.o: %.cpp
7171
$(CXX) -c $(TCXXFLAGS) $(CPPFLAGS) -fPIC $< -o $@
7272

7373
.PHONY: elf_parser
74-
elf_parser:
74+
elf_parser: $(OBJS)
7575
$(MAKE) -C linux
7676

7777
.PHONY: clean

0 commit comments

Comments
 (0)