Skip to content

Commit

Permalink
Streamline FMSPC retrieval instructions (#124)
Browse files Browse the repository at this point in the history
* streamline FMSPC retrieval instructions

* fix: remove redirection to /dev/null in PCKID retrieval command

* refactoring

* revert "refactoring"

---------

Co-authored-by: Roger <[email protected]>
  • Loading branch information
lagunovsky and RogerLamTd authored May 2, 2024
1 parent ccdcf08 commit 8b23bae
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions README_Docker_and_RA.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ At the moment Raiko only supports certain `fmspc`, so to prevent wasted time che
To retrieve this information, you will need to use the `PCKIDRetrievalTool` and query the Intel API.
1. Retrieving PCK Certs
We need to retrieve Intel's PCK Certificates
Install the `PCKIDRetrievalTool`
1. Install the `PCKIDRetrievalTool`
You can install either from the Ubuntu repository:
```
Expand All @@ -83,9 +79,19 @@ sudo apt install sgx-pck-id-retrieval-tool
```
Or, you can [build and install][sgx-pck-id-retrieval-tool] it yourself.
After you have installed it, You should be ready to retrieve fetch Intel's certificates!
2. Retrieve your machine's FMSPC by running the following command:
```shell
echo "Please enter Intel's PCS Service API key" && read -r API_KEY && PCKIDRetrievalTool -f /tmp/pckid.csv && pckid=$(cat /tmp/pckid.csv) && ppid=$(echo "$pckid" | awk -F "," '{print $1}') && cpusvn=$(echo "$pckid" | awk -F "," '{print $3}') && pcesvn=$(echo "$pckid" | awk -F "," '{print $4}') && pceid=$(echo "$pckid" | awk -F "," '{print $2}') && curl -v "https://api.trustedservices.intel.com/sgx/certification/v4/pckcert?encrypted_ppid=${ppid}&cpusvn=${cpusvn}&pcesvn=${pcesvn}&pceid=${pceid}" -H "Ocp-Apim-Subscription-Key:${API_KEY}" 2>&1 | grep -i "SGX-FMSPC"
```

<details>
<summary>Or you can retrieve FMSPC step by step</summary>


Run the following command:
After you have installed PCKIDRetrievalTool, You should be ready to retrieve fetch Intel's certificates!

1. Run the following command:

```
PCKIDRetrievalTool
Expand Down Expand Up @@ -154,6 +160,8 @@ n7qROhU4OOJnVs9lqNxxi8AFrJJHU2E=
-----END CERTIFICATE-----
```

</details>

Currently Supported FMSPCs:
- 00606A000000
- 00A067110000
Expand Down

0 comments on commit 8b23bae

Please sign in to comment.