From 704ec8c55977a400ea6abfecd6475735c7bdca45 Mon Sep 17 00:00:00 2001 From: ilbertt Date: Thu, 31 Oct 2024 14:26:09 +0100 Subject: [PATCH 1/2] chore: update dependencies --- Cargo.lock | 407 +++++++++--------- Cargo.toml | 3 +- src/ic-websocket-cdk/Cargo.toml | 11 +- src/ic-websocket-cdk/src/lib.rs | 2 +- .../integration_tests/utils/certification.rs | 10 +- src/test_canister/Cargo.toml | 1 - src/test_canister/src/lib.rs | 2 +- 7 files changed, 223 insertions(+), 213 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 944d419..99aaecb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,12 +128,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -208,20 +202,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bls12_381" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3c196a77437e7cc2fb515ce413a6401291578b5afc8ecb29a3c7ab957f05941" -dependencies = [ - "digest 0.9.0", - "ff 0.12.1", - "group 0.12.1", - "pairing", - "rand_core", - "subtle", -] - [[package]] name = "bumpalo" version = "3.16.0" @@ -242,11 +222,13 @@ checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "cached" -version = "0.46.1" +version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c8c50262271cdf5abc979a5f76515c234e764fa025d1ba4862c0f0bcda0e95" +checksum = "69b0116662497bc24e4b177c90eaf8870e39e2714c3fcfa296327a93f593fc21" dependencies = [ "ahash", + "cached_proc_macro", + "cached_proc_macro_types", "hashbrown", "instant", "once_cell", @@ -255,13 +237,11 @@ dependencies = [ [[package]] name = "cached" -version = "0.47.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b0116662497bc24e4b177c90eaf8870e39e2714c3fcfa296327a93f593fc21" +checksum = "a8466736fe5dbcaf8b8ee24f9bbefe43c884dc3e9ff7178da70f55bffca1133c" dependencies = [ "ahash", - "cached_proc_macro", - "cached_proc_macro_types", "hashbrown", "instant", "once_cell", @@ -564,9 +544,9 @@ dependencies = [ "base16ct", "crypto-bigint", "digest 0.10.7", - "ff 0.13.0", + "ff", "generic-array", - "group 0.13.0", + "group", "pem-rfc7468", "pkcs8", "rand_core", @@ -581,6 +561,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" +dependencies = [ + "serde", +] + [[package]] name = "errno" version = "0.3.9" @@ -588,7 +577,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -618,16 +607,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core", - "subtle", -] - [[package]] name = "ff" version = "0.13.0" @@ -770,24 +749,13 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff 0.12.1", - "rand_core", - "subtle", -] - [[package]] name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand_core", "subtle", ] @@ -827,6 +795,12 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + [[package]] name = "hex" version = "0.4.3" @@ -916,7 +890,7 @@ dependencies = [ "hyper", "hyper-util", "rustls", - "rustls-native-certs", + "rustls-native-certs 0.7.1", "rustls-pki-types", "tokio", "tokio-rustls", @@ -946,15 +920,19 @@ dependencies = [ [[package]] name = "ic-agent" -version = "0.36.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba85280257d8663adef20bf5c043b287b3a283d4f916073eb3ca9166a4a59d4b" +checksum = "158138fcb769fe6288e63d5db221c904e472cfb7d376aba13a38c060f2984e63" dependencies = [ "async-lock", + "async-trait", "backoff", - "cached 0.46.1", + "cached 0.52.0", "candid", + "der", + "ecdsa", "ed25519-consensus", + "elliptic-curve", "futures-util", "hex", "http", @@ -971,7 +949,6 @@ dependencies = [ "rangemap", "reqwest", "ring", - "rustls-webpki 0.101.7", "sec1", "serde", "serde_bytes", @@ -982,14 +959,15 @@ dependencies = [ "thiserror", "time", "tokio", + "tower-service", "url", ] [[package]] name = "ic-cbor" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc917070b8fc4bd88e3199746372e44d507f54c93a9b191787e1caefca1eba" +checksum = "02b0e48b4166c891e79d624f3a184b4a7c145d307576872d9a46dedb8c73ea8f" dependencies = [ "candid", "ic-certification", @@ -1000,9 +978,9 @@ dependencies = [ [[package]] name = "ic-cdk" -version = "0.13.2" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8859bc2b863a77750acf199e1fb7e3fc403e1b475855ba13f59cb4e4036d238" +checksum = "3b1da6a25b045f9da3c9459c0cb2b0700ac368ee16382975a17185a23b9c18ab" dependencies = [ "candid", "ic-cdk-macros 0.13.2", @@ -1013,12 +991,12 @@ dependencies = [ [[package]] name = "ic-cdk" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c44983d6e97135d86132111bae5b86c34c498d96b4f182638bebcc7ac07e03c" +checksum = "dd8ecacd682fa05a985253592963306cb9799622d7b1cce4b1edb89c6ec85be1" dependencies = [ "candid", - "ic-cdk-macros 0.15.0", + "ic-cdk-macros 0.16.0", "ic0 0.23.0", "serde", "serde_bytes", @@ -1040,9 +1018,9 @@ dependencies = [ [[package]] name = "ic-cdk-macros" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3af44fb4ec3a4b18831c9d3303ca8fa2ace846c4022d50cb8df4122635d3782e" +checksum = "0d4d857135deef20cc7ea8f3869a30cd9cfeb1392b3a81043790b2cd82adc3e0" dependencies = [ "candid", "proc-macro2", @@ -1054,12 +1032,12 @@ dependencies = [ [[package]] name = "ic-cdk-timers" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fdca8e1d9ffb65ae68019b342c182009de9dc206fd849db0b0e90ee19f6fa4" +checksum = "0c7c528bbb3d4d934b43a364855995d318649217c7510f40f92ad52eba3ff7be" dependencies = [ "futures", - "ic-cdk 0.15.0", + "ic-cdk 0.16.0", "ic0 0.23.0", "serde", "serde_bytes", @@ -1068,9 +1046,9 @@ dependencies = [ [[package]] name = "ic-certificate-verification" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769142849e241e6cf7f5611f9b04983e958729495ea67d2de95e5d9a9c687d9b" +checksum = "586e09b06a93d930f6a33f5f909bb11d2e4a06be3635dd5da1eb0e6554b7dae4" dependencies = [ "cached 0.47.0", "candid", @@ -1087,9 +1065,9 @@ dependencies = [ [[package]] name = "ic-certification" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20052ce9255fbe2de7041a4f6996fddd095ba1f31ae83b6c0ccdee5be6e7bbcf" +checksum = "e64ee3d8b6e81b51f245716d3e0badb63c283c00f3c9fb5d5219afc30b5bf821" dependencies = [ "hex", "serde", @@ -1099,9 +1077,9 @@ dependencies = [ [[package]] name = "ic-transport-types" -version = "0.36.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce14c068bd053c0f5ab525326f3f358f265cdfcae279fbf6461fb529e9682acd" +checksum = "2d8789a5c176bb1b925fa58ca97c651a3995d504e76101e93d2a17f558bdcf66" dependencies = [ "candid", "hex", @@ -1109,6 +1087,7 @@ dependencies = [ "leb128", "serde", "serde_bytes", + "serde_cbor", "serde_repr", "sha2 0.10.8", "thiserror", @@ -1116,14 +1095,16 @@ dependencies = [ [[package]] name = "ic-verify-bls-signature" -version = "0.1.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583b1c03380cf86059160cc6c91dcbf56c7b5f141bf3a4f06bc79762d775fac4" +checksum = "d420b25c0091059f6c3c23a21427a81915e6e0aca3b79e0d403ed767f286a3b9" dependencies = [ - "bls12_381", + "hex", + "ic_bls12_381", "lazy_static", "pairing", - "sha2 0.9.9", + "rand", + "sha2 0.10.8", ] [[package]] @@ -1133,8 +1114,7 @@ dependencies = [ "base64 0.22.1", "candid", "ic-agent", - "ic-cdk 0.15.0", - "ic-cdk-macros 0.15.0", + "ic-cdk 0.16.0", "ic-cdk-timers", "ic-certificate-verification", "ic-certification", @@ -1161,6 +1141,20 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de254dd67bbd58073e23dc1c8553ba12fa1dc610a19de94ad2bbcd0460c067f" +[[package]] +name = "ic_bls12_381" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22c65787944f32af084dffd0c68c1e544237b76e215654ddea8cd9f527dd8b69" +dependencies = [ + "digest 0.10.7", + "ff", + "group", + "pairing", + "rand_core", + "subtle", +] + [[package]] name = "ic_principal" version = "0.1.1" @@ -1232,9 +1226,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa", @@ -1311,6 +1305,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1328,13 +1332,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -1446,11 +1451,11 @@ dependencies = [ [[package]] name = "pairing" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" dependencies = [ - "group 0.12.1", + "group", ] [[package]] @@ -1479,7 +1484,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1490,11 +1495,11 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pem" -version = "2.0.1" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "serde", ] @@ -1557,20 +1562,22 @@ dependencies = [ [[package]] name = "pocket-ic" -version = "3.1.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9765eeff77b8750cf6258eaeea237b96607cd770aa3d4003f021924192b7e4e" +checksum = "beff607d4dbebff8d003453ced669d2645e905de496ca93713f3d47633357e6c" dependencies = [ - "async-trait", "base64 0.13.1", "candid", "hex", - "ic-cdk 0.13.2", + "ic-cdk 0.13.5", "reqwest", "schemars", "serde", "serde_bytes", "serde_json", + "sha2 0.10.8", + "slog", + "tokio", "tracing", "tracing-appender", "tracing-subscriber", @@ -1696,7 +1703,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1808,9 +1815,9 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -1828,12 +1835,13 @@ dependencies = [ "js-sys", "log", "mime", + "mime_guess", "once_cell", "percent-encoding", "pin-project-lite", "quinn", "rustls", - "rustls-native-certs", + "rustls-native-certs 0.8.0", "rustls-pemfile", "rustls-pki-types", "serde", @@ -1851,7 +1859,7 @@ dependencies = [ "wasm-streams", "web-sys", "webpki-roots", - "winreg", + "windows-registry", ] [[package]] @@ -1876,7 +1884,7 @@ dependencies = [ "libc", "spin", "untrusted", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1901,7 +1909,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1913,7 +1921,7 @@ dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.5", + "rustls-webpki", "subtle", "zeroize", ] @@ -1931,6 +1939,19 @@ dependencies = [ "security-framework", ] +[[package]] +name = "rustls-native-certs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "rustls-pki-types", + "schannel", + "security-framework", +] + [[package]] name = "rustls-pemfile" version = "2.1.2" @@ -1947,16 +1968,6 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "rustls-webpki" version = "0.102.5" @@ -1998,7 +2009,7 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -2208,6 +2219,15 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + [[package]] name = "signature" version = "2.2.0" @@ -2239,6 +2259,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slog" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" +dependencies = [ + "erased-serde", +] + [[package]] name = "slotmap" version = "1.0.7" @@ -2261,7 +2290,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -2338,6 +2367,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "tempfile" @@ -2348,7 +2380,7 @@ dependencies = [ "cfg-if", "fastrand", "rustix", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -2356,8 +2388,7 @@ name = "test_canister" version = "0.1.0" dependencies = [ "candid", - "ic-cdk 0.15.0", - "ic-cdk-macros 0.15.0", + "ic-cdk 0.16.0", "ic-websocket-cdk", "serde", "serde_cbor", @@ -2441,17 +2472,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.1" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", "libc", "mio", + "parking_lot", "pin-project-lite", + "signal-hook-registry", "socket2", - "windows-sys 0.48.0", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", ] [[package]] @@ -2467,9 +2512,9 @@ dependencies = [ [[package]] name = "tokio-socks" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" +checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" dependencies = [ "either", "futures-util", @@ -2627,6 +2672,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "unicase" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -2828,36 +2879,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-targets 0.48.5", + "windows-result", + "windows-strings", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.52.0" +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -2866,46 +2923,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2918,64 +2957,30 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "zerocopy" version = "0.7.35" diff --git a/Cargo.toml b/Cargo.toml index 9974569..154c52c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,8 +13,7 @@ license = "MIT" ic-websocket-cdk = { path = "src/ic-websocket-cdk" } candid = "0.10" -ic-cdk = "0.15" -ic-cdk-macros = "0.15" +ic-cdk = "0.16" serde = "1.0" serde_cbor = "0.11" diff --git a/src/ic-websocket-cdk/Cargo.toml b/src/ic-websocket-cdk/Cargo.toml index 6f12dff..285b537 100644 --- a/src/ic-websocket-cdk/Cargo.toml +++ b/src/ic-websocket-cdk/Cargo.toml @@ -14,23 +14,22 @@ exclude = ["**/*.did"] [dependencies] candid = { workspace = true } ic-cdk = { workspace = true } -ic-cdk-macros = { workspace = true } -ic-cdk-timers = "0.9" +ic-cdk-timers = "0.10" serde = { workspace = true } serde_cbor = { workspace = true } -ic-certification = "2.5" +ic-certification = "2.6" base64 = "0.22" sha2 = "0.10" serde_bytes = "0.11" [dev-dependencies] -ic-agent = "0.36" +ic-agent = { version = "0.39", features = ["ring"] } proptest = "1.5" rand = "0.8" ring = "0.17" lazy_static = "1.5" -pocket-ic = "3.1" -ic-certificate-verification = "2.4" +pocket-ic = "5.0" +ic-certificate-verification = "2.6" [package.metadata.docs.rs] default-target = "wasm32-unknown-unknown" diff --git a/src/ic-websocket-cdk/src/lib.rs b/src/ic-websocket-cdk/src/lib.rs index 86488be..502d05b 100644 --- a/src/ic-websocket-cdk/src/lib.rs +++ b/src/ic-websocket-cdk/src/lib.rs @@ -145,7 +145,7 @@ pub fn ws_close(args: CanisterWsCloseArguments) -> CanisterWsCloseResult { /// /// # Example /// ```rust -/// use ic_cdk_macros::*; +/// use ic_cdk::{update}; /// use candid::{CandidType}; /// use ic_websocket_cdk::{CanisterWsMessageArguments, CanisterWsMessageResult}; /// use serde::Deserialize; diff --git a/src/ic-websocket-cdk/src/tests/integration_tests/utils/certification.rs b/src/ic-websocket-cdk/src/tests/integration_tests/utils/certification.rs index 45a56e1..01cc70c 100644 --- a/src/ic-websocket-cdk/src/tests/integration_tests/utils/certification.rs +++ b/src/ic-websocket-cdk/src/tests/integration_tests/utils/certification.rs @@ -4,11 +4,19 @@ use sha2::{Digest, Sha256}; use super::test_env::TestEnv; +const ALLOWED_CERTIFICATE_TIME_OFFSET_NS: u128 = 5 * 60 * 1_000_000; // 5 minutes + pub fn is_valid_certificate(test_env: &TestEnv, certificate: &[u8], tree: &[u8]) -> bool { let cert: Certificate = serde_cbor::from_slice(certificate).unwrap(); let canister_id = test_env.get_test_canister_id(); let canister_id_bytes = canister_id.as_slice(); - let verify_res = cert.verify(canister_id_bytes, &test_env.get_root_ic_key()); + let current_time_ns = test_env.get_canister_time() as u128; + let verify_res = cert.verify( + canister_id_bytes, + &test_env.get_root_ic_key(), + ¤t_time_ns, + &ALLOWED_CERTIFICATE_TIME_OFFSET_NS, + ); match verify_res { Ok(_) => { let tree: HashTree = serde_cbor::from_slice(tree).unwrap(); diff --git a/src/test_canister/Cargo.toml b/src/test_canister/Cargo.toml index c541eb7..577e293 100644 --- a/src/test_canister/Cargo.toml +++ b/src/test_canister/Cargo.toml @@ -9,7 +9,6 @@ crate-type = ["cdylib"] [dependencies] candid = { workspace = true } ic-cdk = { workspace = true } -ic-cdk-macros = { workspace = true } serde = { workspace = true } serde_cbor = { workspace = true } ic-websocket-cdk = { workspace = true } diff --git a/src/test_canister/src/lib.rs b/src/test_canister/src/lib.rs index 01ac921..f81a0fc 100644 --- a/src/test_canister/src/lib.rs +++ b/src/test_canister/src/lib.rs @@ -1,4 +1,4 @@ -use ic_cdk_macros::*; +use ic_cdk::{init, post_upgrade, query, update}; use canister::{on_close, on_message, on_open, AppMessage}; use ic_websocket_cdk::{ From abe8f24075d3583a29d327147da8564913cb0277 Mon Sep 17 00:00:00 2001 From: ilbertt Date: Thu, 31 Oct 2024 14:26:46 +0100 Subject: [PATCH 2/2] chore: bump to version v0.4.1 --- Cargo.lock | 2 +- src/ic-websocket-cdk/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 99aaecb..bb192ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1109,7 +1109,7 @@ dependencies = [ [[package]] name = "ic-websocket-cdk" -version = "0.4.0" +version = "0.4.1" dependencies = [ "base64 0.22.1", "candid", diff --git a/src/ic-websocket-cdk/Cargo.toml b/src/ic-websocket-cdk/Cargo.toml index 285b537..3b997b0 100644 --- a/src/ic-websocket-cdk/Cargo.toml +++ b/src/ic-websocket-cdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ic-websocket-cdk" -version = "0.4.0" +version = "0.4.1" edition.workspace = true rust-version.workspace = true repository.workspace = true