Devolutions / Devolutions/IronRDP
RustCrypto / Dalek Dependency Line Conflicts with russh 0.61
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 275
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 189
Description
When using IronRDP and `russh 0.61.2` in the same Cargo workspace, dependency resolution fails because the two stacks currently depend on different RustCrypto / Dalek prerelease lines.
`russh 0.61.2` uses the newer line:
- `curve25519-dalek = 5.0.0-rc.0`
- `ed25519-dalek = 3.0.0-rc.0`
- `x25519-dalek = 3.0.0-rc.0`
- `p256 / p384 / p521 = 0.14.0-rc.10`
The IronRDP authentication path currently reaches older exact pins through `sspi-rs` and `picky-rs`, for example:
- `curve25519-dalek = 5.0.0-pre.6`
- `ed25519-dalek = 3.0.0-pre.6`
- `x25519-dalek = 3.0.0-pre.6`
- `p256 / p384 / p521 = 0.14.0-rc.9`
Because these are exact prerelease pins, Cargo cannot resolve both lines together.
The first resolver error is:
```text
failed to select a version for `curve25519-dalek`
previously selected package `curve25519-dalek v5.0.0-rc.0`
... which satisfies dependency `curve25519-dalek = "=5.0.0-rc.0"` of package `russh v0.61.2`
versions that meet the requirements `=5.0.0-pre.6` are: 5.0.0-pre.6
... required by package `picky v7.0.0-rc.23`
... required by package `ironrdp-connector`
```
I tested a downstream fix by moving the IronRDP authentication dependency chain to the same dependency line as `russh 0.61.2`.
Commits:
- picky-rs: https://github.com/fluxterm/picky-rs/commit/01b584fbd60ccd0f579f4f20b5f4d49ca3e457e3
- sspi-rs: https://github.com/fluxterm/sspi-rs/commit/7aae095957cd56075d68be56cfeca15610d16dce
- IronRDP: https://github.com/fluxterm/IronRDP/commit/1c3ce7aaf8f90f999d6f2e15be1d7869261c9f5e
## What Changed
In `picky-rs`, the main change is aligning the crypto pins with the `russh 0.61.2` line:
- `curve25519-dalek`: `5.0.0-pre.6` -> `5.0.0-rc.0`
- `ed25519-dalek`: `3.0.0-pre.6` -> `3.0.0-rc.0`
- `x25519-dalek`: `3.0.0-pre.6` -> `3.0.0-rc.0`
- `p256 / p384 / p521`: `0.14.0-rc.9` -> `0.14.0-rc.10`
- `ecdsa`: `0.17.0-rc.17` -> `0.17.0-rc.18`
- `elliptic-curve`: `0.14.0-rc.32` -> `0.14.0-rc.33`
- `ff / group`: `0.14.0-pre.0` -> `0.14.0`
In `sspi-rs`, the same dependency line needs to be used consistently, including DPAPI-related pins:
- `rsa`: `0.10.0-rc.17` -> `0.10.0-rc.18`
- `pkcs8`: `0.11.0-rc.11` -> `0.11.0`
- `signature`: `3.0.0-rc.10` -> `3.0.0`
- `pbkdf2`: `0.13.0-rc.10` -> `0.13.0`
`picky`, `picky-asn1`, `picky-asn1-der`, `picky-asn1-x509`, and `picky-krb` also need to resolve from the same source/version line. Otherwise Cargo can compile duplicate ASN.1 crate instances and produce type mismatch errors.
In IronRDP, the connector side needs to use the updated `sspi-rs` / `picky-rs` line. I also changed the direct `picky` dependency in `ironrdp-connector` to avoid default features:
```toml
picky = { version = "=7.0.0-rc.23", default-features = false, features = ["x509"] }
```
This is enough for the connector usage and avoids pulling unrelated crypto dependencies.
The old `uuid <1.21` constraint in `ironrdp-mstsgu` can also be removed once the older `picky` / `rand_core` line is gone.
## Result
With these three changes applied together, IronRDP can coexist with `russh 0.61.2` in the same dependency graph, and `curve25519-dalek` resolves to a single version:
```text
curve25519-dalek v5.0.0-rc.0
```
I wanted to share this dependency-line mismatch and the downstream fix that made the combined dependency graph resolve.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.