From 51376d405e602ec8f3b23a6d3bdd5938e6a6f43a Mon Sep 17 00:00:00 2001 From: Christiaan676 Date: Sat, 26 Aug 2023 19:29:26 +0200 Subject: [PATCH] Remove wirte_pem function, as its incorrect and write_pem_string should be used. --- mbedtls/src/x509/csr.rs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/mbedtls/src/x509/csr.rs b/mbedtls/src/x509/csr.rs index b48d66eb0..687630221 100644 --- a/mbedtls/src/x509/csr.rs +++ b/mbedtls/src/x509/csr.rs @@ -167,27 +167,6 @@ impl<'a> Builder<'a> { ) } - pub fn write_pem<'buf, F: Random>( - &mut self, - buf: &'buf mut [u8], - rng: &mut F, - ) -> Result> { - match unsafe { - x509write_csr_der( - &mut self.inner, - buf.as_mut_ptr(), - buf.len(), - Some(F::call), - rng.data_ptr(), - ) - .into_result() - } { - Err(e) if e.low_level() == Some(codes::Base64BufferTooSmall) => Ok(None), - Err(e) => Err(e), - Ok(n) => Ok(Some(&buf[buf.len() - (n as usize)..])), - } - } - pub fn write_pem_string(&mut self, rng: &mut F) -> Result { alloc_string_repeat(|buf, size| unsafe { match x509write_csr_pem(