diff --git a/Cargo.lock b/Cargo.lock index 3d42673a3..6a76f7a32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -148,7 +148,7 @@ dependencies = [ "chrono", "hmac", "log", - "rand 0.8.5", + "rand", "serde", "serde_json", "sha2", @@ -782,7 +782,7 @@ dependencies = [ "lazy_static", "log", "nix 0.27.1", - "rand 0.8.5", + "rand", "retry", "semver", "serde", @@ -988,7 +988,7 @@ dependencies = [ "nix 0.26.4", "openssl", "pretty_env_logger", - "rand 0.8.5", + "rand", "reqwest", "serde", "serde_yaml", @@ -1009,7 +1009,7 @@ dependencies = [ "log", "nix 0.26.4", "openssl", - "rand 0.8.5", + "rand", "secrecy", "serde_bytes", "sys-info", @@ -1104,7 +1104,7 @@ dependencies = [ "hex", "log", "openssl", - "rand 0.8.5", + "rand", "regex", "tokio", "tss-esapi", @@ -1127,7 +1127,7 @@ dependencies = [ "serde", "serde_yaml", "tar", - "tempdir", + "tempfile", "thiserror", "tokio", "warp", @@ -1301,12 +1301,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "futures" version = "0.3.30" @@ -2465,7 +2459,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared", - "rand 0.8.5", + "rand", ] [[package]] @@ -2637,19 +2631,6 @@ dependencies = [ "scheduled-thread-pool", ] -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi", -] - [[package]] name = "rand" version = "0.8.5" @@ -2658,7 +2639,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -2668,24 +2649,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", + "rand_core", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.6.4" @@ -2695,15 +2661,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -2742,15 +2699,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - [[package]] name = "reqwest" version = "0.12.7" @@ -3327,16 +3275,6 @@ version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -dependencies = [ - "rand 0.4.6", - "remove_dir_all", -] - [[package]] name = "tempfile" version = "3.10.1" @@ -3363,7 +3301,7 @@ dependencies = [ "percent-encoding", "pest", "pest_derive", - "rand 0.8.5", + "rand", "regex", "serde", "serde_json", @@ -3616,7 +3554,7 @@ dependencies = [ "http 1.1.0", "httparse", "log", - "rand 0.8.5", + "rand", "sha1", "thiserror", "url", diff --git a/manufacturing-server/Cargo.toml b/manufacturing-server/Cargo.toml index 298559272..a3dac7d51 100644 --- a/manufacturing-server/Cargo.toml +++ b/manufacturing-server/Cargo.toml @@ -19,7 +19,7 @@ hex = "0.4" serde_yaml = "0.9" tar = "0.4.41" flate2 = "1.0.31" -tempdir = "0.3.7" +tempfile = "3" fdo-data-formats = { path = "../data-formats", version = "0.5.1" } fdo-http-wrapper = { path = "../http-wrapper", version = "0.5.1", features = ["server"] } diff --git a/manufacturing-server/src/main.rs b/manufacturing-server/src/main.rs index 168201173..5be9c1c6a 100644 --- a/manufacturing-server/src/main.rs +++ b/manufacturing-server/src/main.rs @@ -16,7 +16,7 @@ use openssl::{ x509::X509, }; use serde_yaml::Value; -use tempdir::TempDir; +use tempfile::TempDir; use tokio::signal::unix::{signal, SignalKind}; use warp::reply::Response; @@ -337,13 +337,13 @@ async fn main() -> Result<()> { *res.status_mut() = warp::http::StatusCode::NOT_FOUND; return res; } - let tmp_dir = TempDir::new("manufacturer-server-ovs").unwrap(); + let tmp_dir = TempDir::with_prefix("manufacturer-server-ovs").unwrap(); for ov in ovs { let file_path = tmp_dir.path().join(ov.header().guid().to_string()); let tmp_file = File::create(file_path).unwrap(); OwnershipVoucher::serialize_to_writer(&ov, &tmp_file).unwrap(); } - let tmp_dir_archive = TempDir::new("manufacturer-server-ovs-archive").unwrap(); + let tmp_dir_archive = TempDir::with_prefix("manufacturer-server-ovs-archive").unwrap(); let tar_gz = File::create(tmp_dir_archive.path().join("ovs.tar.gz")).unwrap(); let mut tar = tar::Builder::new(tar_gz); tar.append_dir_all(".", tmp_dir).unwrap();