Repository: eclipse-zenoh/zenoh (language: rust)

Issue:
mismatch in version of tokio-rustls causes zenoh to not compile
### Describe the bug

Certain permutations of a valid Cargo.lock, which can happen in large codebases, will result in a version mismatch where tls-listener uses a different version of `tokio-rustls` than `zenoh-link-tls` does.

I think this is possible because tls-listener [can use either v0.25.0 or v0.26.0](https://github.com/tmccombs/tls-listener/blob/9ae1f923ee26f8410f8d79a6108e40add74e30ce/Cargo.toml#L29), whereas `zenoh-link-tls` only ever uses v0.26.0.

Instead, zenoh-link-tls should use the [version that tls-listener exports](https://github.com/tmccombs/tls-listener/blob/e052bbcf471a6bababe19abd9c04fedb651a162f/src/lib.rs#L37)

### To reproduce

I have created a minimal reproducible Cargo.lock and full example here: https://github.com/TheButlah/bugs/pull/2

Here are the crates and how they depend on tokio-rustls:
```
❯ cargo tree -i tokio-rustls@0.25.0
tokio-rustls v0.25.0
└── tls-listener v0.10.3
    └── zenoh-link-tls v1.1.1
        └── zenoh-link v1.1.1
            ├── zenoh v1.1.1
            │   └── repro v0.1.0 (/Users/ryan.butler/P/bugs)
            └── zenoh-transport v1.1.1
                └── zenoh v1.1.1 (*)

❯ cargo tree -i tokio-rustls@0.26.0
tokio-rustls v0.26.0
└── zenoh-link-tls v1.1.1
    └── zenoh-link v1.1.1
        ├── zenoh v1.1.1
        │   └── repro v0.1.0 (/Users/ryan.butler/P/bugs)
        └── zenoh-transport v1.1.1
            └── zenoh v1.1.1 (*)
```

### System info

- Zenoh version: 1.1.1
- platform: macos
mismatch in version of tokio-rustls causes zenoh to not compile
### Describe the bug

Certain permutations of a valid Cargo.lock, which can happen in large codebases, will result in a version mismatch where tls-listener uses a different version of `tokio-rustls` than `zenoh-link-tls` does.

I think this is possible because tls-listener [can use either v0.25.0 or v0.26.0](https://github.com/tmccombs/tls-listener/blob/9ae1f923ee26f8410f8d79a6108e40add74e30ce/Cargo.toml#L29), whereas `zenoh-link-tls` only ever uses v0.26.0.

Instead, zenoh-link-tls should use the [version that tls-listener exports](https://github.com/tmccombs/tls-listener/blob/e052bbcf471a6bababe19abd9c04fedb651a162f/src/lib.rs#L37)

### To reproduce

I have created a minimal reproducible Cargo.lock and full example here: https://github.com/TheButlah/bugs/pull/2

Here are the crates and how they depend on tokio-rustls:
```
❯ cargo tree -i tokio-rustls@0.25.0
tokio-rustls v0.25.0
└── tls-listener v0.10.3
    └── zenoh-link-tls v1.1.1
        └── zenoh-link v1.1.1
            ├── zenoh v1.1.1
            │   └── repro v0.1.0 (/Users/ryan.butler/P/bugs)
            └── zenoh-transport v1.1.1
                └── zenoh v1.1.1 (*)

❯ cargo tree -i tokio-rustls@0.26.0
tokio-rustls v0.26.0
└── zenoh-link-tls v1.1.1
    └── zenoh-link v1.1.1
        ├── zenoh v1.1.1
        │   └── repro v0.1.0 (/Users/ryan.butler/P/bugs)
        └── zenoh-transport v1.1.1
            └── zenoh v1.1.1 (*)
```

### System info

- Zenoh version: 1.1.1
- platform: macos


Discussion / hints:
I tried my hand at fixing it by using the re-exports from tls-listener in #1774, but failed. Unfortunately I don't think its actually possible to fix in zenoh, it needs to be fixed in `tls-listener`. Suggest upvoting https://github.com/tmccombs/tls-listener/issues/52
`tls-listener v0.11.0` has just released which should fix the issue downstream. All zenoh needs to do now is pull in the new version.
I tried my hand at fixing it by using the re-exports from tls-listener in #1774, but failed. Unfortunately I don't think its actually possible to fix in zenoh, it needs to be fixed in `tls-listener`. Suggest upvoting https://github.com/tmccombs/tls-listener/issues/52
`tls-listener v0.11.0` has just released which should fix the issue downstream. All zenoh needs to do now is pull in the new version.

Fix patch:
diff --git a/Cargo.lock b/Cargo.lock
index 4df57cda1..a111a92bc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -227,7 +227,7 @@ dependencies = [
  "nom",
  "num-traits",
  "rusticata-macros",
- "thiserror",
+ "thiserror 1.0.63",
  "time 0.3.36",
 ]
 
@@ -239,7 +239,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
  "synstructure",
 ]
 
@@ -251,7 +251,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -505,7 +505,7 @@ checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -840,7 +840,7 @@ dependencies = [
  "heck",
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -1117,7 +1117,7 @@ dependencies = [
  "proc-macro2",
  "quote",
  "strsim",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -1128,7 +1128,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
 dependencies = [
  "darling_core",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -1189,7 +1189,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -1248,7 +1248,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -1522,7 +1522,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -1622,7 +1622,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -1967,7 +1967,7 @@ dependencies = [
  "combine",
  "jni-sys",
  "log",
- "thiserror",
+ "thiserror 1.0.63",
  "walkdir",
 ]
 
@@ -2589,7 +2589,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "9c73c26c01b8c87956cea613c907c9d6ecffd8d18a2a5908e5de0adfaa185cea"
 dependencies = [
  "memchr",
- "thiserror",
+ "thiserror 1.0.63",
  "ucd-trie",
 ]
 
@@ -2613,7 +2613,7 @@ dependencies = [
  "pest_meta",
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -2667,7 +2667,7 @@ dependencies = [
  "phf_shared",
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -2696,7 +2696,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -2873,7 +2873,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba"
 dependencies = [
  "proc-macro2",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -2927,7 +2927,7 @@ dependencies = [
  "prost",
  "prost-types",
  "regex",
- "syn 2.0.77",
+ "syn 2.0.87",
  "tempfile",
 ]
 
@@ -2941,7 +2941,7 @@ dependencies = [
  "itertools 0.13.0",
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -2966,7 +2966,7 @@ dependencies = [
  "rustc-hash",
  "rustls",
  "socket2 0.5.7",
- "thiserror",
+ "thiserror 1.0.63",
  "tokio",
  "tracing",
 ]
@@ -2984,7 +2984,7 @@ dependencies = [
  "rustls",
  "rustls-platform-verifier",
  "slab",
- "thiserror",
+ "thiserror 1.0.63",
  "tinyvec",
  "tracing",
 ]
@@ -3128,7 +3128,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
 dependencies = [
  "getrandom 0.2.15",
  "libredox",
- "thiserror",
+ "thiserror 1.0.63",
 ]
 
 [[package]]
@@ -3148,7 +3148,7 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -3326,9 +3326,9 @@ dependencies = [
 
 [[package]]
 name = "rustls"
-version = "0.23.13"
+version = "0.23.23"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8"
+checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395"
 dependencies = [
  "log",
  "once_cell",
@@ -3364,9 +3364,9 @@ dependencies = [
 
 [[package]]
 name = "rustls-pki-types"
-version = "1.8.0"
+version = "1.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0"
+checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
 
 [[package]]
 name = "rustls-platform-verifier"
@@ -3458,7 +3458,7 @@ dependencies = [
  "proc-macro2",
  "quote",
  "serde_derive_internals",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -3539,7 +3539,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -3550,7 +3550,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -3582,7 +3582,7 @@ checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6"
 dependencies = [
  "percent-encoding",
  "serde",
- "thiserror",
+ "thiserror 1.0.63",
 ]
 
 [[package]]
@@ -3624,7 +3624,7 @@ dependencies = [
  "darling",
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -4074,9 +4074,9 @@ dependencies = [
 
 [[package]]
 name = "syn"
-version = "2.0.77"
+version = "2.0.87"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
+checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -4091,7 +4091,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -4113,7 +4113,16 @@ version = "1.0.63"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
 dependencies = [
- "thiserror-impl",
+ "thiserror-impl 1.0.63",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
+dependencies = [
+ "thiserror-impl 2.0.11",
 ]
 
 [[package]]
@@ -4124,7 +4133,18 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -4270,13 +4290,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
 
 [[package]]
 name = "tls-listener"
-version = "0.10.2"
+version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f1d8809f604e448c7bc53a5a0e4c2a0a20ba44cb1fb407314c8eeccb92127f9"
+checksum = "ab41256c16d6fc2b3021545f20bf77a73200b18bd54040ac656dddfca6205bfa"
 dependencies = [
  "futures-util",
  "pin-project-lite 0.2.14",
- "thiserror",
+ "thiserror 2.0.11",
  "tokio",
  "tokio-rustls",
 ]
@@ -4314,17 +4334,16 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
 name = "tokio-rustls"
-version = "0.26.0"
+version = "0.26.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
+checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37"
 dependencies = [
  "rustls",
- "rustls-pki-types",
  "tokio",
 ]
 
@@ -4418,7 +4437,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
@@ -4487,7 +4506,7 @@ dependencies = [
  "log",
  "rand 0.8.5",
  "sha1 0.10.6",
- "thiserror",
+ "thiserror 1.0.63",
  "utf-8",
 ]
 
@@ -4539,7 +4558,7 @@ version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "c878a167baa8afd137494101a688ef8c67125089ff2249284bd2b5f9bfedb815"
 dependencies = [
- "thiserror",
+ "thiserror 1.0.63",
 ]
 
 [[package]]
@@ -4802,7 +4821,7 @@ dependencies = [
  "once_cell",
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
  "wasm-bindgen-shared",
 ]
 
@@ -4836,7 +4855,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
  "wasm-bindgen-backend",
  "wasm-bindgen-shared",
 ]
@@ -5146,7 +5165,7 @@ dependencies = [
  "nom",
  "oid-registry",
  "rusticata-macros",
- "thiserror",
+ "thiserror 1.0.63",
  "time 0.3.36",
 ]
 
@@ -5592,7 +5611,7 @@ version = "1.2.1"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
  "zenoh-keyexpr",
 ]
 
@@ -5872,7 +5891,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.77",
+ "syn 2.0.87",
 ]
 
 [[package]]
diff --git a/Cargo.toml b/Cargo.toml
index 0e7cf279e..2b93d472d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -193,7 +193,7 @@ x509-parser = "0.16.0"
 z-serial = "0.3.1"
 either = "1.13.0"
 prost = "0.13.2"
-tls-listener = { version = "0.10.2", features = ["rustls-ring"] }
+tls-listener = { version = "0.11.0", features = ["rustls-ring"] }
 zenoh-ext = { version = "1.2.1", path = "zenoh-ext", default-features = false }
 zenoh-shm = { version = "1.2.1", path = "commons/zenoh-shm" }
 zenoh-result = { version = "1.2.1", path = "commons/zenoh-result", default-features = false }


Test patch: