File tree Expand file tree Collapse file tree
wrapper/rust/wolfssl/src/wolfcrypt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1270,10 +1270,9 @@ impl ECC {
12701270 /// let _x963_size = ecc.export_x963(&mut x963).expect("Error with export_x963()");
12711271 /// ```
12721272 pub fn export_x963 ( & mut self , dout : & mut [ u8 ] ) -> Result < usize , i32 > {
1273- let dout_ptr = dout. as_ptr ( ) as * mut u8 ;
12741273 let mut out_len: u32 = dout. len ( ) as u32 ;
12751274 let rc = unsafe {
1276- ws:: wc_ecc_export_x963 ( & mut self . wc_ecc_key , dout_ptr , & mut out_len)
1275+ ws:: wc_ecc_export_x963 ( & mut self . wc_ecc_key , dout . as_mut_ptr ( ) , & mut out_len)
12771276 } ;
12781277 if rc != 0 {
12791278 return Err ( rc) ;
@@ -1303,10 +1302,9 @@ impl ECC {
13031302 /// let _x963_size = ecc.export_x963_compressed(&mut x963).expect("Error with export_x963_compressed()");
13041303 /// ```
13051304 pub fn export_x963_compressed ( & mut self , dout : & mut [ u8 ] ) -> Result < usize , i32 > {
1306- let dout_ptr = dout. as_ptr ( ) as * mut u8 ;
13071305 let mut out_len: u32 = dout. len ( ) as u32 ;
13081306 let rc = unsafe {
1309- ws:: wc_ecc_export_x963_ex ( & mut self . wc_ecc_key , dout_ptr , & mut out_len, 1 )
1307+ ws:: wc_ecc_export_x963_ex ( & mut self . wc_ecc_key , dout . as_mut_ptr ( ) , & mut out_len, 1 )
13101308 } ;
13111309 if rc != 0 {
13121310 return Err ( rc) ;
You can’t perform that action at this time.
0 commit comments