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

Replace rust-spdm with spdm-rs. #2

Merged
merged 1 commit into from
Jan 2, 2024
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ All documents are put at [doc](./doc/) folder.

### Checkout repo
```
git clone https://github.com/intel/rust-spdm.git
git clone https://github.com/intel/spdm-rs.git
git submodule update --init --recursive
```

Expand Down Expand Up @@ -198,22 +198,22 @@ nmake copy_sample_key
nmake
```

Test rust-spdm as requester:
Test spdm-rs as requester:

1. run libspdm in spdm-emu as responder:
```
cd bin
spdm_responder_emu.exe --trans PCI_DOE
```

2. run rust-spdm-emu as requester:
2. run spdm-rs-emu as requester:
```
cargo run -p spdm-requester-emu --no-default-features --features "spdm-ring,hashed-transcript-data,async-executor "
```

Test rust-spdm as responder:
Test spdm-rs as responder:

1. run rust-spdm-emu as Test rust-spdm as responder:
1. run spdm-rs-emu as Test spdm-rs as responder:
```
cargo run -p spdm-responder-emu --no-default-features --features "spdm-ring,hashed-transcript-data,async-executor "
```
Expand Down
2 changes: 1 addition & 1 deletion doc/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rustup component add llvm-tools-preview
```bash
# Export the flags needed to instrument the program to collect code coverage.
export RUSTFLAGS="-Zinstrument-coverage"
export LLVM_PROFILE_FILE="rust-spdm-%p%m.profraw"
export LLVM_PROFILE_FILE="spdm-rs-%p%m.profraw"

# Build the program
cargo build -p spdm-responder-emu -p spdm-requester-emu
Expand Down
30 changes: 15 additions & 15 deletions sh_script/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,50 +46,50 @@ check() {
RUSTFLAGS=${RUSTFLAGS:-}
build() {
pushd spdmlib
echo "Building Rust-SPDM..."
echo "Building spdm-rs..."
cargo build

echo "Building Rust-SPDM with no-default-features..."
echo "Building spdm-rs with no-default-features..."
echo_command cargo build --release --no-default-features

echo "Building Rust-SPDM with spdm-ring feature..."
echo "Building spdm-rs with spdm-ring feature..."
echo_command cargo build --release --no-default-features --features=spdm-ring

echo "Building Rust-SPDM with spdm-ring,is_sync feature..."
echo "Building spdm-rs with spdm-ring,is_sync feature..."
echo_command cargo build --release --no-default-features --features=spdm-ring,is_sync

echo "Building Rust-SPDM with spdm-ring,hashed-transcript-data feature..."
echo "Building spdm-rs with spdm-ring,hashed-transcript-data feature..."
echo_command cargo build --release --no-default-features --features=spdm-ring,hashed-transcript-data

echo "Building Rust-SPDM with spdm-ring,hashed-transcript-data,is_sync feature..."
echo "Building spdm-rs with spdm-ring,hashed-transcript-data,is_sync feature..."
echo_command cargo build --release --no-default-features --features=spdm-ring,hashed-transcript-data,is_sync

echo "Building Rust-SPDM with spdm-ring,hashed-transcript-data,mut-auth feature..."
echo "Building spdm-rs with spdm-ring,hashed-transcript-data,mut-auth feature..."
echo_command cargo build --release --no-default-features --features=spdm-ring,hashed-transcript-data,mut-auth

echo "Building Rust-SPDM with spdm-ring,hashed-transcript-data,mut-auth,is_sync feature..."
echo "Building spdm-rs with spdm-ring,hashed-transcript-data,mut-auth,is_sync feature..."
echo_command cargo build --release --no-default-features --features=spdm-ring,hashed-transcript-data,mut-auth,is_sync

if [ -z "$RUSTFLAGS" ]; then
echo "Building Rust-SPDM in no std with no-default-features..."
echo "Building spdm-rs in no std with no-default-features..."
echo_command cargo build -Z build-std=core,alloc,compiler_builtins --target x86_64-unknown-none --release --no-default-features

echo "Building Rust-SPDM in no std with spdm-ring feature..."
echo "Building spdm-rs in no std with spdm-ring feature..."
echo_command cargo build -Z build-std=core,alloc,compiler_builtins --target x86_64-unknown-none --release --no-default-features --features="spdm-ring"

echo "Building Rust-SPDM in no std with spdm-ring,is_sync feature..."
echo "Building spdm-rs in no std with spdm-ring,is_sync feature..."
echo_command cargo build -Z build-std=core,alloc,compiler_builtins --target x86_64-unknown-none --release --no-default-features --features="spdm-ring,is_sync"

echo "Building Rust-SPDM in no std with spdm-ring,hashed-transcript-data feature..."
echo "Building spdm-rs in no std with spdm-ring,hashed-transcript-data feature..."
echo_command cargo build -Z build-std=core,alloc,compiler_builtins --target x86_64-unknown-none --release --no-default-features --features="spdm-ring,hashed-transcript-data"

echo "Building Rust-SPDM in no std with spdm-ring,hashed-transcript-data,is_sync feature..."
echo "Building spdm-rs in no std with spdm-ring,hashed-transcript-data,is_sync feature..."
echo_command cargo build -Z build-std=core,alloc,compiler_builtins --target x86_64-unknown-none --release --no-default-features --features="spdm-ring,hashed-transcript-data,is_sync"

echo "Building Rust-SPDM in no std with spdm-ring,hashed-transcript-data,mut-auth feature..."
echo "Building spdm-rs in no std with spdm-ring,hashed-transcript-data,mut-auth feature..."
echo_command cargo build -Z build-std=core,alloc,compiler_builtins --target x86_64-unknown-none --release --no-default-features --features="spdm-ring,hashed-transcript-data,mut-auth"

echo "Building Rust-SPDM in no std with spdm-ring,hashed-transcript-data,mut-auth,is_sync feature..."
echo "Building spdm-rs in no std with spdm-ring,hashed-transcript-data,mut-auth,is_sync feature..."
echo_command cargo build -Z build-std=core,alloc,compiler_builtins --target x86_64-unknown-none --release --no-default-features --features="spdm-ring,hashed-transcript-data,mut-auth,is_sync"
fi

Expand Down
2 changes: 1 addition & 1 deletion sh_script/fuzz_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ process_args() {

process_args "$@"

if [[ ! $PWD =~ rust-spdm$ ]]; then
if [[ ! $PWD =~ spdm-rs$ ]]; then
pushd ..
fi

Expand Down
2 changes: 1 addition & 1 deletion sh_script/rudra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [[ $? != 0 ]]; then
exit
fi

if [[ ! $PWD =~ rust-spdm$ ]];then
if [[ ! $PWD =~ spdm-rs$ ]];then
pushd ..
fi

Expand Down
4 changes: 2 additions & 2 deletions sh_script/test_spdm_coverage.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash

if [[ ! $PWD =~ rust-spdm$ ]];then
if [[ ! $PWD =~ spdm-rs$ ]];then
pushd ..
fi

rm -rf ./target

export RUSTFLAGS="-Zinstrument-coverage"
export LLVM_PROFILE_FILE="rust-spdm-%p%m.profraw"
export LLVM_PROFILE_FILE="spdm-rs-%p%m.profraw"

cargo build -p spdm-responder-emu -p spdm-requester-emu

Expand Down
2 changes: 1 addition & 1 deletion sh_script/test_spdm_unit_test_coverage.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
cargo clean

if [[ ! $PWD =~ rust-spdm$ ]];then
if [[ ! $PWD =~ spdm-rs$ ]];then
pushd ..
fi

Expand Down
4 changes: 2 additions & 2 deletions spdmlib/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub enum StatusCodeCore {
ACQUIRE_FAIL = 16,
SESSION_TRY_DISCARD_KEY_UPDATE = 17,

// only in Rust-SPDM
// only in spdm-rs
DECODE_AEAD_FAIL = 0xFE,
}

Expand Down Expand Up @@ -163,7 +163,7 @@ pub enum StatusCodeTransport {
SEND_FAIL = 0,
RECEIVE_FAIL = 1,

// only in Rust-SPDM
// only in spdm-rs
DECAP_FAIL = 0xFE,
DECAP_APP_FAIL = 0xFD,
ENCAP_FAIL = 0xFC,
Expand Down
Loading