From cfc785689410f2b2e35c4a5dbc75b8cadf569f97 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Wed, 17 May 2023 22:46:14 -0400 Subject: [PATCH] Patch serde to github.com/AndrewScull/serde fork serde_derive does not currently support using integer values as map keys. CTAP uses integer values for various CBOR map keys. In order to properly serialize and deserialize types for the CTAP protocol, a forked version of serde from a pull request that adds support for renaming field keys as integer types is used. Tracked in --- Cargo.toml | 3 +++ crates/ctap2-proto/Cargo.toml | 2 +- crates/fido-common/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f53b0ef..22b6b59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,3 +3,6 @@ members = [ "crates/*", ] + +[patch.crates-io] +serde = { git = "https://github.com/AndrewScull/serde", branch = "intnames" } diff --git a/crates/ctap2-proto/Cargo.toml b/crates/ctap2-proto/Cargo.toml index 64aa113..b45c9b3 100644 --- a/crates/ctap2-proto/Cargo.toml +++ b/crates/ctap2-proto/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" fido-common = { path = "../fido-common" } bounded-integer = { version = "0.5.3", features = ["types", "std"] } coset = "0.3.3" -serde = { version = "1.0", features = ["derive"], optional = true } +serde = { version = "=1.0.136", features = ["derive"], optional = true } [features] serde = ["dep:serde", "fido-common/serde", "bounded-integer/serde1"] diff --git a/crates/fido-common/Cargo.toml b/crates/fido-common/Cargo.toml index 916ee10..3d49ffc 100644 --- a/crates/fido-common/Cargo.toml +++ b/crates/fido-common/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] ciborium = { version = "0.2.1", default-features = false, optional = true } coset = { version = "0.3.4", default-features = false } -serde = { version = "1", features = ["derive"], optional = true } +serde = { version = "=1.0.136", features = ["derive"], optional = true } serde_with = { path = "../../../serde_with/serde_with", optional = true } bitflags = { version = "2.2.1", default-features = false, optional = true }