pact-foundation / pact-reference

Reference implementations for the pact specifications
https://pact.io
MIT License
93 stars 46 forks source link

Update rustls to >=0.23 #455

Open ostrolucky opened 4 months ago

ostrolucky commented 4 months ago

My employer uses Cloudflare Warp which uses ECDSA Signature with SHA-512 that is not supported by rustls 0.22.x which FFI here requires

https://github.com/rustls/rustls/issues/1367 https://github.com/denoland/deno/issues/21169

Please update to rustls >=0.23, which supports it so that I can use this project, as right now it's not possible for me:

Failures:

1) Failed to load pact - Failed to load pact 'https://pact-broker.eqs.dev/pacts/provider/data-center-api/consumer/control-tower-ui/latest' - Request failed - error sending request for url (https://pact-broker.eqs.dev/pacts/provider/data-center-api/consumer/control-tower-ui/latest): error trying to connect: invalid peer certificate: BadSignature
rholshausen commented 4 months ago

Unfortunately, it is not that simple as just upgrading that crate. This requires an upgrade to a number of other crates as well (like tokio-rustls, reqwest and hyper-rustls) which in turn require updates to Tokio and Hyper.

Work has been started to rewrite the mock server component using Hyper 1.x, so that all these crates can be updated. That is currently a beta release. It will need to be stabilised and merged into the main first.

YOU54F commented 4 months ago

v2.0.0 of Pact Mock Server was released last week, out of beta, which is the first piece of the puzzle, enabling other crates to be updated

https://github.com/pact-foundation/pact-core-mock-server/releases/tag/libpact_mock_server-v2.0.0

@ostrolucky for an idea of the complexities in upgrading the project, please refer to the ecosystem diagram for the rust project

https://docs.pact.io/diagrams/ecosystem#rust-goldberg-machine

hopefully this will add some additional context to Ron's comments above, as I note your confused emoji.

YOU54F commented 4 months ago

Related issue which contains the rationale for the V2 pact mock server

https://github.com/pact-foundation/pact-reference/issues/414