cleanup patches

This commit is contained in:
bunnie 2022-08-20 00:38:21 +08:00
parent a5aee2b0d5
commit 59a3bc0370
4 changed files with 22 additions and 19 deletions

20
Cargo.lock generated
View file

@ -2995,9 +2995,11 @@ dependencies = [
[[package]]
name = "ring"
version = "0.16.20"
source = "git+https://github.com/betrusted-io/ring-xous?branch=0.16.20-fiat-rs#87163fbe825eb986e92a34623791ee299967fe09"
dependencies = [
"cc",
"libc",
"log",
"once_cell",
"rkyv",
"spin 0.5.2",
@ -3134,16 +3136,6 @@ dependencies = [
"semver 1.0.9",
]
[[package]]
name = "rustls"
version = "0.20.6"
dependencies = [
"log",
"ring",
"sct",
"webpki",
]
[[package]]
name = "rustls"
version = "0.20.6"
@ -3425,9 +3417,10 @@ dependencies = [
"png",
"rand 0.8.5",
"rand_chacha 0.3.1",
"ring",
"rkyv",
"root-keys",
"rustls 0.20.6",
"rustls",
"sha2",
"spectrum-analyzer",
"spinor",
@ -4033,7 +4026,7 @@ dependencies = [
"flate2",
"log",
"once_cell",
"rustls 0.20.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rustls",
"serde",
"serde_json",
"url",
@ -4477,8 +4470,9 @@ dependencies = [
[[package]]
name = "webpki"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
dependencies = [
"log",
"ring",
"untrusted",
]

View file

@ -193,7 +193,7 @@ fn setup_icmp(iface: &mut Interface::<NetPhy>) -> SocketHandle {
fn main() -> ! {
log_server::init_wait().unwrap();
log::set_max_level(log::LevelFilter::Debug);
log::set_max_level(log::LevelFilter::Info);
log::info!("my PID is {}", xous::process::id());
let xns = xous_names::XousNames::new().unwrap();

View file

@ -73,9 +73,10 @@ tracing = {version = "0.1.35", optional = true}
tracing-subscriber = {version = "0.3.11", optional = true}
# for rustls testing
#rustls = "0.20.6"
rustls = {path="../../../rustls/rustls"}
webpki-roots = "0.22.4"
rustls = {version = "0.20.6", optional = true}
# rustls = {path="../../../rustls/rustls"}
webpki-roots = {version = "0.22.4", optional = true}
ring = {version = "0.16.20", optional = true} # for testing ring math functions
# for the curve25519 tests
# hardware acceleration adaptations are inserted into a fork of the main branch.
@ -114,4 +115,5 @@ tracking-alloc = ["tracking-allocator", "tracing", "tracing-subscriber"]
dbg-ecupdate = [] # for issuing manual commands to initiate an EC update (vs UX). Also need to enable this feature in the status crate. Intended for debug only.
test-rekey = []
nettest = [] # batch network tests
default = [] # "debugprint"
tls = ["rustls", "webpki-roots", "ring"]
default = ["tls"] # "debugprint"

View file

@ -385,8 +385,15 @@ impl<'a> ShellCmdApi<'a> for NetCmd {
write!(ret, "Usage: image bunniefoo.com/bunnie/bunny.png").unwrap();
}
}
"tls" => {
#[cfg(feature="tls")]
"rt" => {
log::set_max_level(log::LevelFilter::Trace);
ring::xous_test::p256_elem_add_test();
log::set_max_level(log::LevelFilter::Info);
}
#[cfg(feature="tls")]
"tls" => {
log::set_max_level(log::LevelFilter::Info);
log::info!("starting TLS run");
let mut root_store = rustls::RootCertStore::empty();
log::info!("create root store");