@@ -533,7 +533,7 @@ impl SslContext {
533
533
let file = CString :: new ( file. as_ref ( ) . as_os_str ( ) . to_str ( ) . expect ( "invalid utf8" ) ) . unwrap ( ) ;
534
534
wrap_ssl_result (
535
535
unsafe {
536
- ffi:: SSL_CTX_load_verify_locations ( self . ctx , file. as_ptr ( ) , ptr:: null ( ) )
536
+ ffi:: SSL_CTX_load_verify_locations ( self . ctx , file. as_ptr ( ) as * const _ , ptr:: null ( ) )
537
537
} )
538
538
}
539
539
@@ -543,7 +543,7 @@ impl SslContext {
543
543
let file = CString :: new ( file. as_ref ( ) . as_os_str ( ) . to_str ( ) . expect ( "invalid utf8" ) ) . unwrap ( ) ;
544
544
wrap_ssl_result (
545
545
unsafe {
546
- ffi:: SSL_CTX_use_certificate_file ( self . ctx , file. as_ptr ( ) , file_type as c_int )
546
+ ffi:: SSL_CTX_use_certificate_file ( self . ctx , file. as_ptr ( ) as * const _ , file_type as c_int )
547
547
} )
548
548
}
549
549
@@ -553,7 +553,7 @@ impl SslContext {
553
553
let file = CString :: new ( file. as_ref ( ) . as_os_str ( ) . to_str ( ) . expect ( "invalid utf8" ) ) . unwrap ( ) ;
554
554
wrap_ssl_result (
555
555
unsafe {
556
- ffi:: SSL_CTX_use_certificate_chain_file ( self . ctx , file. as_ptr ( ) , file_type as c_int )
556
+ ffi:: SSL_CTX_use_certificate_chain_file ( self . ctx , file. as_ptr ( ) as * const _ , file_type as c_int )
557
557
} )
558
558
}
559
559
@@ -580,7 +580,7 @@ impl SslContext {
580
580
let file = CString :: new ( file. as_ref ( ) . as_os_str ( ) . to_str ( ) . expect ( "invalid utf8" ) ) . unwrap ( ) ;
581
581
wrap_ssl_result (
582
582
unsafe {
583
- ffi:: SSL_CTX_use_PrivateKey_file ( self . ctx , file. as_ptr ( ) , file_type as c_int )
583
+ ffi:: SSL_CTX_use_PrivateKey_file ( self . ctx , file. as_ptr ( ) as * const _ , file_type as c_int )
584
584
} )
585
585
}
586
586
@@ -604,7 +604,7 @@ impl SslContext {
604
604
wrap_ssl_result (
605
605
unsafe {
606
606
let cipher_list = CString :: new ( cipher_list) . unwrap ( ) ;
607
- ffi:: SSL_CTX_set_cipher_list ( self . ctx , cipher_list. as_ptr ( ) )
607
+ ffi:: SSL_CTX_set_cipher_list ( self . ctx , cipher_list. as_ptr ( ) as * const _ )
608
608
} )
609
609
}
610
610
@@ -791,7 +791,7 @@ impl Ssl {
791
791
pub fn state_string ( & self ) -> & ' static str {
792
792
let state = unsafe {
793
793
let ptr = ffi:: SSL_state_string ( self . ssl ) ;
794
- CStr :: from_ptr ( ptr)
794
+ CStr :: from_ptr ( ptr as * const _ )
795
795
} ;
796
796
797
797
str:: from_utf8 ( state. to_bytes ( ) ) . unwrap ( )
@@ -800,7 +800,7 @@ impl Ssl {
800
800
pub fn state_string_long ( & self ) -> & ' static str {
801
801
let state = unsafe {
802
802
let ptr = ffi:: SSL_state_string_long ( self . ssl ) ;
803
- CStr :: from_ptr ( ptr)
803
+ CStr :: from_ptr ( ptr as * const _ )
804
804
} ;
805
805
806
806
str:: from_utf8 ( state. to_bytes ( ) ) . unwrap ( )
@@ -809,7 +809,7 @@ impl Ssl {
809
809
/// Sets the host name to be used with SNI (Server Name Indication).
810
810
pub fn set_hostname ( & self , hostname : & str ) -> Result < ( ) , SslError > {
811
811
let cstr = CString :: new ( hostname) . unwrap ( ) ;
812
- let ret = unsafe { ffi_extras:: SSL_set_tlsext_host_name ( self . ssl , cstr. as_ptr ( ) ) } ;
812
+ let ret = unsafe { ffi_extras:: SSL_set_tlsext_host_name ( self . ssl , cstr. as_ptr ( ) as * const _ ) } ;
813
813
814
814
// For this case, 0 indicates failure.
815
815
if ret == 0 {
@@ -897,7 +897,7 @@ impl Ssl {
897
897
898
898
let meth = unsafe { ffi:: SSL_COMP_get_name ( ptr) } ;
899
899
let s = unsafe {
900
- String :: from_utf8 ( CStr :: from_ptr ( meth) . to_bytes ( ) . to_vec ( ) ) . unwrap ( )
900
+ String :: from_utf8 ( CStr :: from_ptr ( meth as * const _ ) . to_bytes ( ) . to_vec ( ) ) . unwrap ( )
901
901
} ;
902
902
903
903
Some ( s)
0 commit comments