add support for local trust store for rustls

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
schnell 2024-08-22 12:24:58 +02:00 committed by Maxime “pep” Buquet
commit 274baaef9a
No known key found for this signature in database
GPG key ID: DEDA74AEECA9D0F2
2 changed files with 14 additions and 5 deletions

View file

@ -19,6 +19,7 @@ tokio = { version = "1", features = ["net", "rt", "rt-multi-thread", "macros"] }
tokio-stream = { version = "0.1", features = [] }
tokio-util = { version = "0.7", features = ["codec"] }
webpki-roots = { version = "0.26", optional = true }
rustls-native-certs = { version = "0.7", optional = true }
rxml = { version = "0.12.0", features = ["compact_str"] }
rand = "0.8"
syntect = { version = "5", optional = true }
@ -40,9 +41,11 @@ env_logger = { version = "0.11", default-features = false, features = ["auto-col
tokio-xmpp = { path = ".", features = ["insecure-tcp"]}
[features]
default = ["starttls-rust"]
default = ["starttls-rust", "rustls-native-certs"]
starttls = ["dns"]
tls-rust = ["tokio-rustls", "webpki-roots"]
tls-rust = ["tokio-rustls"]
tls-rust-native-certs = ["tls-rust", "rustls-native-certs"]
tls-rust-webpki-roots = ["tls-rust", "webpki-roots"]
tls-native = ["tokio-native-tls", "native-tls"]
starttls-native = ["starttls", "tls-native"]
starttls-rust = ["starttls", "tls-rust"]