From 6bce0bab345bdfb977927052a8aae26427a71e10 Mon Sep 17 00:00:00 2001 From: James Hodgkinson Date: Sat, 12 Aug 2023 08:01:00 +1000 Subject: [PATCH] OpenSSL dependency update to support v3.x Fixes #339 --- Cargo.toml | 28 ++++++++++++++++++++-------- Makefile | 12 ++++++++++++ fido-hid-rs/src/lib.rs | 2 +- tutorial/wasm/Cargo.toml | 2 +- 4 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 Makefile diff --git a/Cargo.toml b/Cargo.toml index ecb014c7..7cbc48e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,9 +34,7 @@ members = [ ] # Due to --cfg=web_sys_unstable_apis -exclude = [ - "compat_tester/webauthn-rs-demo-wasm", -] +exclude = ["compat_tester/webauthn-rs-demo-wasm"] [workspace.dependencies] base64urlsafedata = { path = "./base64urlsafedata" } @@ -56,21 +54,35 @@ hex = "0.4.3" http = "^0.2.9" http-body = "=1.0.0-rc.2" http-body-util = "=0.1.0-rc.2" -hyper = { version = "=1.0.0-rc.3", default-features = false, features = ["http1"] } +hyper = { version = "=1.0.0-rc.3", default-features = false, features = [ + "http1", +] } nom = "7.1" -openssl = "^0.10.41" +openssl = "^0.10.56" rand = "0.8" serde = { version = "^1.0.141", features = ["derive"] } serde_cbor = { version = "0.12.0-dev", package = "serde_cbor_2" } serde_json = "^1.0.79" tide = "0.16" thiserror = "^1.0.37" -tokio = { version = "1.22.0", features = ["sync", "test-util", "macros", "rt-multi-thread", "time"] } +tokio = { version = "1.22.0", features = [ + "sync", + "test-util", + "macros", + "rt-multi-thread", + "time", +] } tokio-native-tls = "^0.3.1" tokio-stream = { version = "0.1", features = ["sync"] } tokio-tungstenite = { version = "^0.18.0", features = ["native-tls"] } tracing = "^0.1.35" -tracing-subscriber = { version = "0.3", features = ["env-filter", "std", "fmt"] } -tungstenite = { version = "^0.18.0", default-features = false, features = ["handshake"] } +tracing-subscriber = { version = "0.3", features = [ + "env-filter", + "std", + "fmt", +] } +tungstenite = { version = "^0.18.0", default-features = false, features = [ + "handshake", +] } url = "2" uuid = "^1.1.2" diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..4f08795b --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ + +.DEFAULT: help +.PHONY: help +help: + @grep -E -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' + +.PHONY: precommit +precommit: ## all the usual test things +precommit: + cargo test + cargo fmt --check + cargo clippy diff --git a/fido-hid-rs/src/lib.rs b/fido-hid-rs/src/lib.rs index 8847832f..64626418 100644 --- a/fido-hid-rs/src/lib.rs +++ b/fido-hid-rs/src/lib.rs @@ -52,7 +52,7 @@ const FIDO_USAGE_PAGE: u16 = 0xf1d0; const FIDO_USAGE_U2FHID: u16 = 0x01; const HID_RPT_SIZE: usize = 64; const HID_RPT_SEND_SIZE: usize = HID_RPT_SIZE + 1; -const U2FHID_TRANS_TIMEOUT: i32 = 3000; +// const U2FHID_TRANS_TIMEOUT: i32 = 3000; pub type HidReportBytes = [u8; HID_RPT_SIZE]; pub type HidSendReportBytes = [u8; HID_RPT_SEND_SIZE]; diff --git a/tutorial/wasm/Cargo.toml b/tutorial/wasm/Cargo.toml index 0344e980..1297732f 100644 --- a/tutorial/wasm/Cargo.toml +++ b/tutorial/wasm/Cargo.toml @@ -9,7 +9,7 @@ authors = ["William Brown "] crate-type = ["cdylib", "rlib"] [dependencies] -webauthn-rs-proto = { workspace = true, default-features = false, features = ["wasm"] } +webauthn-rs-proto = { workspace = true, features = ["wasm"] } wasm-bindgen = { version = "0.2", features = ["serde-serialize"] } serde-wasm-bindgen = "0.4"