Description: use older branch of crate rustls-native-certs (2/2)
Author: Peter Michael Green <plugwash@debian.org>
Bug-Debian: https://bugs.debian.org/1100658
Forwarded: not-needed
Last-Update: 2025-03-16
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/tonic/Cargo.toml
+++ b/tonic/Cargo.toml
@@ -89,7 +89,7 @@
 
 # rustls
 rustls-pemfile = { version = "2.0", optional = true }
-rustls-native-certs = { version = "0.7", optional = true }
+rustls-native-certs = { version = "0.6.3", optional = true }
 tokio-rustls = { version = "0.26", default-features = false, features = ["logging", "tls12", "ring"], optional = true }
 webpki-roots = { version = "0.26", optional = true }
 
--- a/tonic/src/transport/channel/service/tls.rs
+++ b/tonic/src/transport/channel/service/tls.rs
@@ -38,7 +38,7 @@
 
         #[cfg(feature = "tls-native-roots")]
         if with_native_roots {
-            roots.add_parsable_certificates(rustls_native_certs::load_native_certs()?);
+            roots.add_parsable_certificates(rustls_native_certs::load_native_certs()?.into_iter().map(|cert| cert.0.into()));
         }
 
         #[cfg(feature = "tls-webpki-roots")]
