- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Intel
When I build the RA sample code of sgx-ra-sample under VS2019 & 2017 community and win10, there are two errors of MSB 307 and the code is 1 and 5. The screen shot as follows.
I suspect this error may due to insufficient permissions when building sp and mrsigner, but I still encounter these two problems when I open the RA project with administrator permissions.
Can you tell me how to fix this problem. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello SunnySun,
The build events associated with the projects mrsigner and sp need to be modified.
In mrsigner, in the Post-Build Event, change $(IntDir) to $(OutDir).
Edit mrsigner -> Properties -> Build Events -> Post-Build Event -> Command Line: "$(TargetPath)" $(IntDir)enclave_sigstruct_raw > $(IntDir)enclave_mrsigner.txt -> "$(TargetPath)" $(OutDir)enclave_sigstruct_raw > $(OutDir)enclave_mrsigner.txt
In sp, in the Pre-Build Event, add ..\ to policy.in.
Edit sp -> Properties -> Build Events -> Pre-Build Event - Command Line: powershell -command "$mrs=Get-Content -Path ..\mrsigner\$(IntDir)enclave_mrsigner.txt; ( ( Get-Content -Path ..\policy.in -Raw ) -replace '@MRSIGNER@',$mrs ) | Set-Content $(IntDir)policy.cmd"
Sincerely,
Jesus G.
Intel Customer Support
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello SunnySun,
The build events associated with the projects mrsigner and sp need to be modified.
In mrsigner, in the Post-Build Event, change $(IntDir) to $(OutDir).
Edit mrsigner -> Properties -> Build Events -> Post-Build Event -> Command Line: "$(TargetPath)" $(IntDir)enclave_sigstruct_raw > $(IntDir)enclave_mrsigner.txt -> "$(TargetPath)" $(OutDir)enclave_sigstruct_raw > $(OutDir)enclave_mrsigner.txt
In sp, in the Pre-Build Event, add ..\ to policy.in.
Edit sp -> Properties -> Build Events -> Pre-Build Event - Command Line: powershell -command "$mrs=Get-Content -Path ..\mrsigner\$(IntDir)enclave_mrsigner.txt; ( ( Get-Content -Path ..\policy.in -Raw ) -replace '@MRSIGNER@',$mrs ) | Set-Content $(IntDir)policy.cmd"
Sincerely,
Jesus G.
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Jesus G.
Thanks for your help. I have solved these two problems in VS 2017, and the problem in project mrsigner in VS 2019.
However, in the VS 2019, the problem still exists in the project sp. I don't know if it is related to the version of VS.
Sincerely,
SunnySun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello SunnySun,
The problem seems that the command is not able to find the policy.in file.
The default location of policy.in is under sgx-ra-sample/vs/policy.in.
During the pre-build event, the powershell command is executed from directory sgx-ra-sample/vs/service-provider. Hence we place ../ in front of policy.in in the powershell command line so that it can policy.in one level up.
So, knowing that the powershell command runs in sgx-ra-sample/vs/service-provider you have to tell the powershell command the correct relative path to policy.in.
This works on my VS 2019 environment.
Sincerely,
Jesus G.
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello SunnSun,
Do you still need help with this issue?
Sincerely,
Jesus G.
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello SunnySun,
I hope you have been able to resolve your issue. I have not heard back from you so I will close this inquiry now. If you need further assistance, please open a new thread.
Sincerely,
Jesus G.
Intel Customer Support
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page