Skip to content
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
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deps/spdm-rs
Submodule spdm-rs updated 77 files
+1 −1 .github/workflows/codeql.yml
+4 −4 .github/workflows/coverage.yml
+2 −2 .github/workflows/deny.yml
+2 −2 .github/workflows/dependency-review.yml
+5 −5 .github/workflows/format.yml
+2 −2 .github/workflows/fuzz.yml
+3 −3 .github/workflows/main.yml
+1 −1 .github/workflows/oss-fuzz.yml
+2 −2 .github/workflows/scorecards.yml
+392 −247 Cargo.lock
+8 −2 README.md
+3 −3 codec/src/codec.rs
+8 −2 doc/design_guideline.md
+0 −37 external/patches/ring/0003-EphemeralPrivateKey-from-bytes.patch
+41 −0 external/patches/ring/0003-introduce-EphemeralPrivateKey-serialization.patch
+248 −0 external/patches/ring/0004-Introduce-digest-de-serialization.patch
+1 −1 fuzz-target/fuzzlib/src/lib.rs
+1 −1 fuzz-target/pass_context/src/main.rs
+1 −1 idekm/src/pci_ide_km_requester/pci_ide_km_req_key_prog.rs
+1 −1 idekm/src/pci_ide_km_requester/pci_ide_km_req_key_set_go.rs
+1 −1 idekm/src/pci_ide_km_requester/pci_ide_km_req_key_set_stop.rs
+1 −1 idekm/src/pci_ide_km_requester/pci_ide_km_req_query.rs
+3 −8 idekm/src/pci_idekm.rs
+1 −1 rust-toolchain
+3 −0 sh_script/fuzz_run.sh
+2 −1 sh_script/pre-build.sh
+1 −1 spdmlib/fuzz/Cargo.toml
+41 −53 spdmlib/src/common/mod.rs
+14 −0 spdmlib/src/crypto/crypto_callbacks.rs
+1 −0 spdmlib/src/crypto/crypto_null/dhe_impl.rs
+11 −0 spdmlib/src/crypto/crypto_null/hash_impl.rs
+4 −2 spdmlib/src/crypto/fips/dhe_st/mod.rs
+36 −3 spdmlib/src/crypto/mod.rs
+276 −6 spdmlib/src/crypto/spdm_ring/dhe_impl.rs
+145 −0 spdmlib/src/crypto/spdm_ring/hash_impl.rs
+14 −49 spdmlib/src/error.rs
+1 −1 spdmlib/src/message/certificate.rs
+1 −0 spdmlib/src/protocol/algo.rs
+2 −7 spdmlib/src/protocol/version.rs
+112 −10 spdmlib/src/requester/challenge_req.rs
+22 −5 spdmlib/src/requester/end_session_req.rs
+47 −31 spdmlib/src/requester/finish_req.rs
+17 −4 spdmlib/src/requester/get_capabilities_req.rs
+34 −9 spdmlib/src/requester/get_certificate_req.rs
+26 −9 spdmlib/src/requester/get_digests_req.rs
+106 −108 spdmlib/src/requester/get_measurements_req.rs
+15 −4 spdmlib/src/requester/get_version_req.rs
+12 −3 spdmlib/src/requester/heartbeat_req.rs
+41 −9 spdmlib/src/requester/key_exchange_req.rs
+22 −11 spdmlib/src/requester/key_update_req.rs
+16 −4 spdmlib/src/requester/negotiate_algorithms_req.rs
+38 −8 spdmlib/src/requester/psk_exchange_req.rs
+23 −14 spdmlib/src/requester/psk_finish_req.rs
+51 −9 spdmlib/src/requester/vendor_req.rs
+1 −0 spdmlib_crypto_mbedtls/src/dhe_impl.rs
+15 −0 spdmlib_crypto_mbedtls/src/hash_impl.rs
+1 −1 sys_time/Cargo.toml
+2 −6 tdisp/src/pci_tdisp.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_bind_p2p_stream_request.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_get_device_interface_report.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_get_device_interface_state.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_get_tdisp_capabilities.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_get_tdisp_version.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_lock_interface_request.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_set_mmio_attribute_request.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_start_interface_request.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_stop_interface_request.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_unbind_p2p_stream_request.rs
+1 −1 tdisp/src/pci_tdisp_requester/pci_tdisp_req_vdm_request.rs
+1 −1 test/cavp_acvts_test/src/main.rs
+2 −2 test/spdm-emu/src/crypto_callback.rs
+25 −0 test/spdm-emu/src/spdm_emu.rs
+15 −15 test/spdm-requester-emu/src/main.rs
+10 −10 test/spdm-responder-emu/src/main.rs
+25 −0 test/spdmlib-test/src/common/mod.rs
+11 −11 test/spdmlib-test/src/common/util.rs
+1 −1 test/spdmlib-test/src/requester_tests/vendor_req.rs
44 changes: 10 additions & 34 deletions deps/td-shim-AzCVMEmu/azcvm-extract-report/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions sh_script/preparation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ preparation() {
bash sh_script/preparation.sh
popd

# Apply spdm-rs ring patches to td-shim's ring (used via [patch.crates-io])
pushd deps/td-shim/library/ring
git apply ../../../spdm-rs/external/patches/ring/0003-introduce-EphemeralPrivateKey-serialization.patch
git apply ../../../spdm-rs/external/patches/ring/0004-Introduce-digest-de-serialization.patch
popd

pushd deps/spdm-rs
bash sh_script/pre-build.sh
popd
Expand Down
22 changes: 17 additions & 5 deletions src/migtd/src/spdm/spdm_req.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ pub async fn send_and_receive_pub_key(spdm_requester: &mut RequesterContext) ->

let mut receive_buffer = [0u8; config::MAX_SPDM_MSG_SIZE];
let response = spdm_requester
.send_spdm_vendor_defined_request_ex(None, &send_buffer[..used], &mut receive_buffer)
.send_receive_spdm_vendor_defined_request_ex(
None,
&send_buffer[..used],
&mut receive_buffer,
)
.await?;

// Format checks and save the received public key
Expand Down Expand Up @@ -413,7 +417,11 @@ pub async fn send_and_receive_sdm_migration_attest_info(

let mut receive_buffer = [0u8; config::MAX_SPDM_MSG_SIZE];
let response = spdm_requester
.send_spdm_vendor_defined_request_ex(None, &send_buffer[..send_used], &mut receive_buffer)
.send_receive_spdm_vendor_defined_request_ex(
None,
&send_buffer[..send_used],
&mut receive_buffer,
)
.await?;

//Format checks
Expand Down Expand Up @@ -733,7 +741,7 @@ async fn send_and_receive_sdm_exchange_migration_info(

let mut receive_buffer = [0u8; config::MAX_SPDM_MSG_SIZE];
let response = spdm_requester
.send_spdm_vendor_defined_request_ex(
.send_receive_spdm_vendor_defined_request_ex(
session_id,
&send_buffer[..send_used],
&mut receive_buffer,
Expand Down Expand Up @@ -1017,7 +1025,11 @@ pub async fn send_and_receive_sdm_rebind_attest_info(

let mut receive_buffer = [0u8; config::MAX_SPDM_MSG_SIZE];
let response = spdm_requester
.send_spdm_vendor_defined_request_ex(None, &send_buffer[..send_used], &mut receive_buffer)
.send_receive_spdm_vendor_defined_request_ex(
None,
&send_buffer[..send_used],
&mut receive_buffer,
)
.await?;

//Format checks
Expand Down Expand Up @@ -1219,7 +1231,7 @@ pub async fn send_and_receive_sdm_rebind_info(

let mut receive_buffer = [0u8; config::MAX_SPDM_MSG_SIZE];
let response = spdm_requester
.send_spdm_vendor_defined_request_ex(
.send_receive_spdm_vendor_defined_request_ex(
session_id,
&send_buffer[..send_used],
&mut receive_buffer,
Expand Down
Loading