diff --git a/src/client.rs b/src/client.rs index 051e725..f89b175 100644 --- a/src/client.rs +++ b/src/client.rs @@ -35,7 +35,7 @@ pub struct TlsConfig<'a> { certificates: crate::Certificates<'a>, /// Will use hardware acceleration on the ESP32 if it contains the RSA peripheral. - rsa: Option<&'a mut esp_mbedtls::Rsa<'a>>, + rsa: Option<&'a mut esp_mbedtls::hal::peripherals::RSA>, } /// Type for TLS configuration of HTTP client. @@ -73,7 +73,7 @@ impl<'a> TlsConfig<'a> { pub fn new( version: crate::TlsVersion, certificates: crate::Certificates<'a>, - rsa: Option<&'a mut esp_mbedtls::Rsa<'a>>, + rsa: Option<&'a mut esp_mbedtls::hal::peripherals::RSA>, ) -> Self { Self { version, @@ -137,7 +137,7 @@ where tls.version, tls.certificates, // Create a inner Some(&mut Rsa) because Rsa doesn't implement Copy - tls.rsa.as_mut().map(|inner| inner as &mut esp_mbedtls::Rsa), + tls.rsa.as_mut().map(|p| p as &mut esp_mbedtls::hal::peripherals::RSA), )? .connect() .await?; diff --git a/src/lib.rs b/src/lib.rs index ef21c86..2fb79c6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -76,7 +76,7 @@ impl From for Error { /// Re-export those members since they're used for [client::TlsConfig]. #[cfg(feature = "esp-mbedtls")] -pub use esp_mbedtls::{Certificates, Rsa, TlsVersion, X509}; +pub use esp_mbedtls::{Certificates, TlsVersion, X509}; #[cfg(feature = "esp-mbedtls")] impl From for Error {