Skip to content

Commit

Permalink
Fix ALPN in new TLS setup (#250)
Browse files Browse the repository at this point in the history
* try manually setting ALPN protocols

* fix type error

* version bump
  • Loading branch information
EricBolten committed Feb 8, 2024
1 parent 631a685 commit c3a98eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "steward"
authors = []
version = "4.1.0"
version = "4.1.1"
edition = "2021"

[dependencies]
Expand Down
2 changes: 2 additions & 0 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ pub(crate) async fn auth_config(
_ => panic!("cannot parse private key .pem file"),
};
let mut server_config = rustls::ServerConfig::new(client_auth);
let alpn_protocols: Vec<u8> = "h2".into();
server_config.set_protocols(&[alpn_protocols]);
server_config.set_single_cert(cert, key).unwrap();

Ok(server_config)
Expand Down

0 comments on commit c3a98eb

Please sign in to comment.