tokio-xmpp: Replace deprecated rustls method (add_server_trust_anchors)

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-10-24 18:35:00 +02:00 committed by pep
parent 25c319b2db
commit 5338d2f99a

View file

@ -45,7 +45,7 @@ async fn get_tls_stream<S: AsyncRead + AsyncWrite + Unpin>(
let domain = ServerName::try_from(domain.as_str())?;
let stream = xmpp_stream.into_inner();
let mut root_store = RootCertStore::empty();
root_store.add_server_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.iter().map(|ta| {
root_store.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.iter().map(|ta| {
OwnedTrustAnchor::from_subject_spki_name_constraints(
ta.subject,
ta.spki,