mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +00:00
aquatic_ws: add setting for using tls; update TODO
This commit is contained in:
parent
300aa85cbb
commit
6d06a43db8
5 changed files with 10 additions and 12 deletions
|
|
@ -40,14 +40,14 @@ pub fn create_tls_acceptor(
|
|||
config: &Config,
|
||||
) -> TlsAcceptor {
|
||||
let mut identity_bytes = Vec::new();
|
||||
let mut file = File::open(&config.network.pkcs12_path)
|
||||
let mut file = File::open(&config.network.tls_pkcs12_path)
|
||||
.expect("open pkcs12 file");
|
||||
|
||||
file.read_to_end(&mut identity_bytes).expect("read pkcs12 file");
|
||||
|
||||
let identity = Identity::from_pkcs12(
|
||||
&mut identity_bytes,
|
||||
&config.network.pkcs12_password
|
||||
&config.network.tls_pkcs12_password
|
||||
).expect("create pkcs12 identity");
|
||||
|
||||
let acceptor = TlsAcceptor::new(identity)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue