ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

upgrade rustls #1253

Closed ctm closed 6 months ago

ctm commented 9 months ago

Upgrade to rustls 0.22 when actix-web will allow it.

Right now cargo outdated spews a bunch of differences due to our use of rustls 0.21, since 0.22 is out and it has fewer dependencies. We can't, however, upgrade to 0.22 until actix-web supports it, otherwise we get:

...
error[E0308]: mismatched types
   --> mb2/src/main.rs:569:41
    |
569 |         .bind_rustls_021("0.0.0.0:443", rustls_config(cert_path, key_path))
    |          ---------------                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `rustls::server::server_conn::ServerConfig`, found `ServerConfig`
    |          |
    |          arguments to this method are incorrect
    |
    = note: `ServerConfig` and `rustls::server::server_conn::ServerConfig` have similar names, but are actually distinct types
note: `ServerConfig` is defined in crate `rustls`
   --> /Users/ctm/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.22.0/src/server/server_conn.rs:218:1
    |
218 | pub struct ServerConfig {
    | ^^^^^^^^^^^^^^^^^^^^^^^
note: `rustls::server::server_conn::ServerConfig` is defined in crate `rustls`
   --> /Users/ctm/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.21.9/src/server/server_conn.rs:203:1
    |
203 | pub struct ServerConfig {
    | ^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `rustls` are being used?
note: method defined here
...

So, I'm labeling this as high priority, but I won't do anything about it until that's resolved.

ctm commented 6 months ago

Done. Deploying now. cargo outdated now only complains about http, and that's due to actix-http not allowing 1.0.0 yet.