Skip to content

Commit 7107219

Browse files
committed
Directly use repositories separated from remote-attestation
Update Makefile, compiled tools directly from the git. Update README for the changes, some cosmetics. Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
1 parent 651cb6b commit 7107219

File tree

4 files changed

+40
-39
lines changed

4 files changed

+40
-39
lines changed

examples/veraison/Makefile

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ROOT = $(shell git rev-parse --show-toplevel)
2-
ISLET_RA := ${ROOT}/../remote-attestation
3-
ROCLI = ${ISLET_RA}/tools/rocli
4-
RSICTL = ${ISLET_RA}/tools/rsictl
2+
ROCLI = https://github.com/islet-project/rocli.git
3+
RSICTL = https://github.com/islet-project/rsictl.git
54
OUT = ${ROOT}/out/shared
5+
CONFIG_ARM = --config target.aarch64-unknown-linux-gnu.linker='"aarch64-none-linux-gnu-gcc"' --config target.aarch64-unknown-linux-gnu.rustflags='[ "-C", "target-feature=+crt-static" ]'
66
TARGET_X86_64 = x86_64-unknown-linux-gnu
77
TARGET_ARM = aarch64-unknown-linux-gnu
88

@@ -13,27 +13,25 @@ all: ${OUT} bin/rocli ${OUT}/bin/rsictl bin/rsictl bin/reliant-party ${OUT}/bin/
1313
${OUT}:
1414
mkdir -p "${OUT}"
1515

16-
bin/rocli: ${ROCLI} ${ROCLI}/src
17-
cargo install --profile release --path "${ROCLI}" --root . --target ${TARGET_X86_64}
16+
bin/rocli:
17+
cargo install --profile release --git "${ROCLI}" --root . --target ${TARGET_X86_64}
1818

19-
${OUT}/bin/rsictl: ${RSICTL} ${RSICTL}/src
20-
cargo install --profile release --path "${RSICTL}" --root "${OUT}" --target ${TARGET_ARM}
19+
${OUT}/bin/rsictl:
20+
cargo install ${CONFIG_ARM} --profile release --git "${RSICTL}" --root "${OUT}" --target ${TARGET_ARM}
2121

22-
bin/rsictl: ${RSICTL} ${RSICTL}/src
23-
cargo install --profile release --path "${RSICTL}" --root . --target ${TARGET_X86_64}
22+
bin/rsictl:
23+
cargo install --profile release --git "${RSICTL}" --root . --target ${TARGET_X86_64}
2424

2525
bin/reliant-party: reliant-party reliant-party/src
2626
cargo install --profile release --path reliant-party --root . --target ${TARGET_X86_64}
2727

2828
${OUT}/bin/realm-application: realm-application realm-application/src
29-
cargo install --profile release --path realm-application --root "${OUT}" --target ${TARGET_ARM}
29+
cargo install ${CONFIG_ARM} --profile release --path realm-application --root "${OUT}" --target ${TARGET_ARM}
3030

3131
${OUT}/root-ca.crt: realm-application/root-ca.crt
3232
cp realm-application/root-ca.crt ${OUT}
3333

3434
clean:
35-
cargo clean --profile release --manifest-path "${ROCLI}"/Cargo.toml --target ${TARGET_X86_64}
36-
cargo clean --profile release --manifest-path "${RSICTL}"/Cargo.toml --target ${TARGET_ARM}
3735
cargo clean --profile release --manifest-path reliant-party/Cargo.toml --target ${TARGET_X86_64}
3836
cargo clean --profile release --manifest-path realm-application/Cargo.toml --target ${TARGET_ARM}
3937
rm -rf bin

examples/veraison/RUN.md

+24-21
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,38 @@ The following repos will be used:
1616

1717
* Islet: https://github.com/islet-project/islet that provides:
1818

19-
* the whole SW/FW stack and scripts for running the emulated environment under the FVP
20-
* Islet HES https://github.com/islet-project/islet/tree/main/hes
21-
* kvmtool-rim-measurer from https://github.com/islet-project/islet/tree/main/third-party/
22-
23-
* Islet Remote Attestation: https://github.com/islet-project/remote-attestation that provides:
24-
25-
* rocli: https://github.com/islet-project/remote-attestation/tree/main/tools/rocli
26-
Tool for provisioning reference token and CPAK to the Veraison services.
27-
* realm-verifier: https://github.com/islet-project/remote-attestation/tree/main/lib/realm-verifier
28-
A library for veryfing RIM and REMs with reference values.
29-
* ratls: https://github.com/islet-project/remote-attestation/tree/main/lib/ratls
19+
* the whole SW/FW stack and scripts for running the emulated environment under the FVP
20+
* Islet HES https://github.com/islet-project/islet/tree/main/hes
21+
* kvmtool-rim-measurer from https://github.com/islet-project/islet/tree/main/third-party/
22+
23+
* Various miscelanous tools and libraries for Remote Attestation
24+
25+
* rust-rsi: https://github.com/islet-project/rust-rsi
26+
A library implementing token and RSI related functionalities (fetching, parsing).
27+
* rsictl: https://github.com/islet-project/rsictl
28+
Tool for performing RSI operations from user space.
29+
* rocli: https://github.com/islet-project/rocli
30+
Tool for provisioning reference token and CPAK to the Veraison services.
31+
* ratls: https://github.com/islet-project/ratls
3032
A library implementing RaTLS protocol for attestation purposes.
31-
* rust-rsi: https://github.com/islet-project/remote-attestation/tree/main/lib/rust-rsi
32-
A library implementing token and RSI related functionalities (fetching, parsing).
33+
* realm-verifier: https://github.com/islet-project/realm-verifier
34+
A library for verifying RIM and REMs with reference values.
35+
* veraison-verifier: https://github.com/islet-project/veraison-verifier
36+
A library for verifying platform token with reference values using Veraison service.
3337

3438
* veraison: https://github.com/veraison/services
3539

3640
# Preparation
3741

38-
The 3 aforementioned repositories should be checked out on the same level so it
39-
should look like following:
42+
Only the Islet repository should be checked manually:
4043

4144
CCA/islet
42-
CCA/remote-attestation
4345

4446
Now run `make` inside the `CCA/islet/examples/veraison` directory. This compiles
4547
some tools that will be used for this demo and places them inside proper
4648
directories. It also copies the `root-ca.crt` used by `realm-application`.
4749

48-
CCA/islet/examples/veraison $ make
50+
CCA/islet/examples/veraison $ make
4951

5052
The files installed are:
5153

@@ -128,7 +130,7 @@ The generated token is saved as the following file:
128130
Realm measurement is done by generating a json file containing realm information
129131
that will be fed to realm verifier.
130132

131-
### Using kvmtool-rim-measurer
133+
### Using kvmtool-rim-measurer (TODO: this needs simplification)
132134

133135
This is performed by a small helper program called `kvmtool-rim-measurer`. It basically
134136
runs a modified lkvm tool that calculates and displays the RIM
@@ -155,7 +157,8 @@ RIM value is between `[]` characters.
155157
### Create a refence measurement values file
156158

157159
Create a `reference.json` file using the commands below (replace the
158-
`PASTE_THE_OBTAINED_RIM_HEX_STRING_HERE` with the RIM obtained from one of the previous steps:
160+
`PASTE_THE_OBTAINED_RIM_HEX_STRING_HERE` with the RIM obtained from one of the
161+
previous steps):
159162

160163
```
161164
export RIM="PASTE_THE_OBTAINED_RIM_HEX_STRING_HERE"
@@ -236,9 +239,9 @@ This is how it looks:
236239
buildroot login: root
237240

238241
# cd /shared
239-
shared # ./set-realm-ip.sh
242+
shared # ./set-realm-ip.sh
240243
shared # insmod rsi.ko
241-
shared # date 120512002023
244+
shared # date 120512002023
242245

243246
# Running and provisioning verification services (Veraison, realm-verifier)
244247

examples/veraison/realm-application/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ description = "Realm application for the remote attestation"
1111

1212
[dependencies]
1313
clap = { version = "*", features = ["derive"] }
14-
rust-rsi = { git = "https://github.com/islet-project/remote-attestation" }
15-
ratls = { git = "https://github.com/islet-project/remote-attestation" }
14+
rust-rsi = { git = "https://github.com/islet-project/rust-rsi" }
15+
ratls = { git = "https://github.com/islet-project/ratls" }
1616

1717
[profile.release]
1818
strip = true

examples/veraison/reliant-party/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ env_logger ="*"
1414
hex = "*"
1515
log = "*"
1616
tinyvec = "*"
17-
rust-rsi = { git = "https://github.com/islet-project/remote-attestation" }
18-
ratls = { git = "https://github.com/islet-project/remote-attestation" }
19-
realm-verifier = { git = "https://github.com/islet-project/remote-attestation" }
20-
veraison-verifier = { git = "https://github.com/islet-project/remote-attestation" }
17+
rust-rsi = { git = "https://github.com/islet-project/rust-rsi" }
18+
ratls = { git = "https://github.com/islet-project/ratls" }
19+
realm-verifier = { git = "https://github.com/islet-project/realm-verifier" }
20+
veraison-verifier = { git = "https://github.com/islet-project/veraison-verifier" }
2121
serde_json = "*"

0 commit comments

Comments
 (0)