From 40423f9448333f375a3d6e028beffa72d4bbb7ee Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 1 Feb 2024 01:42:18 +0800 Subject: [PATCH] fix hosted and renode modes --- Cargo.lock | 2 +- apps/vault/Cargo.toml | 2 +- apps/vault/libraries/crypto/Cargo.toml | 2 +- libs/tls/Cargo.toml | 5 ++++- services/gam/Cargo.toml | 8 ++++---- services/pddb/Cargo.toml | 8 ++++---- services/root-keys/Cargo.toml | 10 +++++----- services/shellchat/Cargo.toml | 8 ++++---- services/status/Cargo.toml | 10 +++++----- 9 files changed, 29 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 89f570a89..711500f0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4464,7 +4464,7 @@ dependencies = [ [[package]] name = "sha2" version = "0.10.8" -source = "git+https://github.com/betrusted-io/hashes.git?branch=sha2-v0.10.8-xous#9a2d88c142edb1b99c49dcd559f66367c6c17fc2" +source = "git+https://github.com/betrusted-io/hashes.git?branch=sha2-v0.10.8-xous#899876dcf233eb50ea0ccf8d5cfeb874bba06334" dependencies = [ "cfg-if", "cpufeatures", diff --git a/apps/vault/Cargo.toml b/apps/vault/Cargo.toml index befde33d0..898488659 100644 --- a/apps/vault/Cargo.toml +++ b/apps/vault/Cargo.toml @@ -53,7 +53,7 @@ sha1 = "0.10.6" hmac = "0.12.1" digest = "0.9.0" base32 = "0.4.0" -sha2 = { version = "0.10.8", features = ["precursor"] } +sha2 = { version = "0.10.8" } sntpc = { version = "0.3.1" } net = { path = "../../services/net" } com_rs = { git = "https://github.com/betrusted-io/com_rs", rev = "891bdd3ca8e41f81510d112483e178aea3e3a921" } diff --git a/apps/vault/libraries/crypto/Cargo.toml b/apps/vault/libraries/crypto/Cargo.toml index 2807aa3aa..03b2c1e24 100644 --- a/apps/vault/libraries/crypto/Cargo.toml +++ b/apps/vault/libraries/crypto/Cargo.toml @@ -23,7 +23,7 @@ p256 = { version = "0.10.1", default-features = false, features = [ ] } cbc = "0.1.2" aes = { path = "../../../../services/aes" } -sha2 = { version = "0.10.8", features = ["precursor"] } +sha2 = { version = "0.10.8" } log = "0.4.14" # xous debugging diff --git a/libs/tls/Cargo.toml b/libs/tls/Cargo.toml index 967f14586..ca78172b6 100644 --- a/libs/tls/Cargo.toml +++ b/libs/tls/Cargo.toml @@ -22,7 +22,7 @@ pddb = { path = "../../services/pddb" } der = { version = "0.7.6", features = ["derive"] } locales = { path = "../../locales" } rkyv = "0.4.3" -sha2 = { version = "0.10.8", features = ["precursor"] } +sha2 = { version = "0.10.8" } # note requirement for patch to xous-ring in workspace Cargo.toml rustls = { version = "0.21.7", features = ["dangerous_configuration"] } @@ -33,3 +33,6 @@ x509-parser = "0.15.0" [features] rootCA = ["webpki-roots"] +precursor = ["sha2/precursor"] +hosted = ["sha2/hosted"] +renode = ["sha2/renode"] diff --git a/services/gam/Cargo.toml b/services/gam/Cargo.toml index eda45f14a..1dab341ae 100644 --- a/services/gam/Cargo.toml +++ b/services/gam/Cargo.toml @@ -40,15 +40,15 @@ miniz_oxide = "0.4.4" # used in bip39 dialogue hex = { version = "0.4.3", default-features = false, features = ["alloc"] } -sha2 = { version = "0.10.8", features = ["precursor"] } +sha2 = { version = "0.10.8" } digest = "0.9.0" utralib = { version = "0.1.24", optional = true, default-features = false } [features] -precursor = ["utralib/precursor"] -hosted = ["utralib/hosted"] -renode = ["utralib/renode"] +precursor = ["utralib/precursor", "sha2/precursor"] +hosted = ["utralib/hosted", "sha2/hosted"] +renode = ["utralib/renode", "sha2/renode"] debugprint = [] tts = [] # default = ["debugprint"] # "debugprint" diff --git a/services/pddb/Cargo.toml b/services/pddb/Cargo.toml index f1a1a5354..ea0be6454 100644 --- a/services/pddb/Cargo.toml +++ b/services/pddb/Cargo.toml @@ -35,7 +35,7 @@ tts-frontend = { path = "../tts" } rand_core = "0.5.1" # passwords -sha2 = { version = "0.10.8", features = ["precursor"] } +sha2 = { version = "0.10.8" } digest = "0.9.0" hkdf = "0.12.4" zeroize = "1.3.0" @@ -63,9 +63,9 @@ hex = { version = "0.4.3", default-features = false, features = [ ], optional = true } [features] -precursor = ["utralib/precursor"] -hosted = ["utralib/hosted"] -renode = ["utralib/renode"] +precursor = ["utralib/precursor", "sha2/precursor"] +hosted = ["utralib/hosted", "sha2/hosted"] +renode = ["utralib/renode", "sha2/renode"] # when selected, physical disk addresses are set to 64 bits, otherwise, they are 32 bits. # 32 bit addressing is recommended for Precursor, as its disk is only 128MiB and it has limited RAM for bookkeeping. u64_pa = [] diff --git a/services/root-keys/Cargo.toml b/services/root-keys/Cargo.toml index f69c8c1e5..0293f2238 100644 --- a/services/root-keys/Cargo.toml +++ b/services/root-keys/Cargo.toml @@ -62,11 +62,11 @@ keyboard = { path = "../keyboard" } # private keys #sha2 = {version = "0.9.5", default-features = false, features = []} -sha2 = { version = "0.10.8", features = ["precursor"] } +sha2 = { version = "0.10.8" } digest = "0.9.0" aes = { path = "../aes" } engine-25519 = { path = "../engine-25519" } -byteorder = "1.4.3" # used by keywrap +byteorder = "1.4.3" # used by keywrap # hardware acceleration adaptations are inserted into a fork of the main branch. hex = { version = "0.4.3", default-features = false, features = [] } @@ -82,9 +82,9 @@ default-features = false features = ["u32_backend", "rand"] [features] -precursor = ["utralib/precursor"] -hosted = ["utralib/hosted"] -renode = ["utralib/renode"] +precursor = ["utralib/precursor", "sha2/precursor"] +hosted = ["utralib/hosted", "sha2/hosted"] +renode = ["utralib/renode", "sha2/renode"] policy-menu = [ ] # provisions for users to set their password retention policies (on the block for deprecation) (note: to re-enable you need to add "rootkeys menu" to the tokens.rs in the GAM) hazardous-debug = [ diff --git a/services/shellchat/Cargo.toml b/services/shellchat/Cargo.toml index 144abb874..7e58e9f15 100644 --- a/services/shellchat/Cargo.toml +++ b/services/shellchat/Cargo.toml @@ -24,7 +24,7 @@ xous-names = { package = "xous-api-names", version = "0.9.55" } keyboard = { path = "../keyboard" } susres = { package = "xous-api-susres", version = "0.9.53" } codec = { path = "../codec" } -sha2 = { version = "0.10.8", features = ["precursor"] } +sha2 = { version = "0.10.8" } digest = "0.9.0" aes = { path = "../aes" } cipher = "0.3.0" @@ -113,9 +113,9 @@ default-features = false features = ["u32_backend", "rand"] [features] -precursor = ["utralib/precursor"] -hosted = ["utralib/hosted", "random-pick"] -renode = ["utralib/renode"] +precursor = ["utralib/precursor", "sha2/precursor"] +hosted = ["utralib/hosted", "sha2/hosted", "random-pick"] +renode = ["utralib/renode", "sha2/renode"] debugprint = [] spinortest = [ ] # for spinor testing. contra-indicated with PDDB, as it steals memory from the PDDB. diff --git a/services/status/Cargo.toml b/services/status/Cargo.toml index b36c005b6..a2f685f77 100644 --- a/services/status/Cargo.toml +++ b/services/status/Cargo.toml @@ -42,7 +42,7 @@ rkyv = { version = "0.4.3", default-features = false, features = [ chrono = { version = "0.4.19", default-features = false, features = ["std"] } crossbeam = "0.8.2" -sha2 = { version = "0.10.8", features = ["precursor"] } +sha2 = { version = "0.10.8" } digest = "0.9.0" xous-semver = "0.1.2" com_rs = { git = "https://github.com/betrusted-io/com_rs", rev = "891bdd3ca8e41f81510d112483e178aea3e3a921" } @@ -54,11 +54,11 @@ utralib = { version = "0.1.24", optional = true, default-features = false } chrono = "0.4.19" [features] -precursor = ["utralib/precursor"] -hosted = ["utralib/hosted"] -renode = ["utralib/renode"] +precursor = ["utralib/precursor", "sha2/precursor"] +hosted = ["utralib/hosted", "sha2/hosted"] +renode = ["utralib/renode", "sha2/renode"] debugprint = [] -braille = [] # used for braille mode, so console isn't overwhelmed with status +braille = [] # used for braille mode, so console isn't overwhelmed with status tts = [] # default = ["debugprint"] # "debugprint" dbg-ecupdate = []