@@ -12,16 +12,16 @@ pub type X509 = c_void;
12
12
pub type X509_NAME = c_void ;
13
13
pub type CRYPTO_EX_DATA = c_void ;
14
14
15
- pub type CRYPTO_EX_new = extern "C" fn ( parent : * c_void , ptr : * c_void ,
16
- ad : * CRYPTO_EX_DATA , idx : c_int ,
17
- argl : c_long , argp : * c_void ) -> c_int ;
18
- pub type CRYPTO_EX_dup = extern "C" fn ( to : * CRYPTO_EX_DATA ,
19
- from : * CRYPTO_EX_DATA , from_d : * c_void ,
20
- idx : c_int , argl : c_long , argp : * c_void )
15
+ pub type CRYPTO_EX_new = extern "C" fn ( parent : * mut c_void , ptr : * mut c_void ,
16
+ ad : * const CRYPTO_EX_DATA , idx : c_int ,
17
+ argl : c_long , argp : * const c_void ) -> c_int ;
18
+ pub type CRYPTO_EX_dup = extern "C" fn ( to : * mut CRYPTO_EX_DATA ,
19
+ from : * mut CRYPTO_EX_DATA , from_d : * mut c_void ,
20
+ idx : c_int , argl : c_long , argp : * mut c_void )
21
21
-> c_int ;
22
- pub type CRYPTO_EX_free = extern "C" fn ( parent : * c_void , ptr : * c_void ,
23
- ad : * CRYPTO_EX_DATA , idx : c_int ,
24
- argl : c_long , argp : * c_void ) ;
22
+ pub type CRYPTO_EX_free = extern "C" fn ( parent : * mut c_void , ptr : * mut c_void ,
23
+ ad : * mut CRYPTO_EX_DATA , idx : c_int ,
24
+ argl : c_long , argp : * mut c_void ) ;
25
25
26
26
pub static CRYPTO_LOCK : c_int = 1 ;
27
27
@@ -103,58 +103,58 @@ extern "C" {
103
103
pub fn CRYPTO_num_locks ( ) -> c_int ;
104
104
pub fn CRYPTO_set_locking_callback ( func : extern "C" fn ( mode : c_int ,
105
105
n : c_int ,
106
- file : * c_char ,
106
+ file : * const c_char ,
107
107
line : c_int ) ) ;
108
108
109
109
pub fn ERR_get_error ( ) -> c_ulong ;
110
110
111
111
pub fn SSL_library_init ( ) -> c_int ;
112
112
113
113
#[ cfg( sslv2) ]
114
- pub fn SSLv2_method ( ) -> * SSL_METHOD ;
115
- pub fn SSLv3_method ( ) -> * SSL_METHOD ;
116
- pub fn TLSv1_method ( ) -> * SSL_METHOD ;
117
- pub fn SSLv23_method ( ) -> * SSL_METHOD ;
118
-
119
- pub fn SSL_CTX_new ( method : * SSL_METHOD ) -> * SSL_CTX ;
120
- pub fn SSL_CTX_free ( ctx : * SSL_CTX ) ;
121
- pub fn SSL_CTX_set_verify ( ctx : * SSL_CTX , mode : c_int ,
122
- verify_callback : Option < extern fn ( c_int , * X509_STORE_CTX ) -> c_int > ) ;
123
- pub fn SSL_CTX_load_verify_locations ( ctx : * SSL_CTX , CAfile : * c_char ,
124
- CApath : * c_char ) -> c_int ;
125
- pub fn SSL_CTX_get_ex_new_index ( argl : c_long , argp : * c_void ,
114
+ pub fn SSLv2_method ( ) -> * const SSL_METHOD ;
115
+ pub fn SSLv3_method ( ) -> * const SSL_METHOD ;
116
+ pub fn TLSv1_method ( ) -> * const SSL_METHOD ;
117
+ pub fn SSLv23_method ( ) -> * const SSL_METHOD ;
118
+
119
+ pub fn SSL_CTX_new ( method : * const SSL_METHOD ) -> * mut SSL_CTX ;
120
+ pub fn SSL_CTX_free ( ctx : * mut SSL_CTX ) ;
121
+ pub fn SSL_CTX_set_verify ( ctx : * mut SSL_CTX , mode : c_int ,
122
+ verify_callback : Option < extern fn ( c_int , * mut X509_STORE_CTX ) -> c_int > ) ;
123
+ pub fn SSL_CTX_load_verify_locations ( ctx : * mut SSL_CTX , CAfile : * const c_char ,
124
+ CApath : * const c_char ) -> c_int ;
125
+ pub fn SSL_CTX_get_ex_new_index ( argl : c_long , argp : * const c_void ,
126
126
new_func : Option < CRYPTO_EX_new > ,
127
127
dup_func : Option < CRYPTO_EX_dup > ,
128
128
free_func : Option < CRYPTO_EX_free > )
129
129
-> c_int ;
130
- pub fn SSL_CTX_set_ex_data ( ctx : * SSL_CTX , idx : c_int , data : * c_void )
130
+ pub fn SSL_CTX_set_ex_data ( ctx : * mut SSL_CTX , idx : c_int , data : * mut c_void )
131
131
-> c_int ;
132
- pub fn SSL_CTX_get_ex_data ( ctx : * SSL_CTX , idx : c_int ) -> * c_void ;
133
-
134
- pub fn X509_STORE_CTX_get_ex_data ( ctx : * X509_STORE_CTX , idx : c_int )
135
- -> * c_void ;
136
- pub fn X509_STORE_CTX_get_current_cert ( ct : * X509_STORE_CTX ) -> * X509 ;
137
- pub fn X509_STORE_CTX_get_error ( ctx : * X509_STORE_CTX ) -> c_int ;
138
-
139
- pub fn X509_get_subject_name ( x : * X509 ) -> * X509_NAME ;
140
-
141
- pub fn SSL_new ( ctx : * SSL_CTX ) -> * SSL ;
142
- pub fn SSL_free ( ssl : * SSL ) ;
143
- pub fn SSL_set_bio ( ssl : * SSL , rbio : * BIO , wbio : * BIO ) ;
144
- pub fn SSL_get_rbio ( ssl : * SSL ) -> * BIO ;
145
- pub fn SSL_get_wbio ( ssl : * SSL ) -> * BIO ;
146
- pub fn SSL_connect ( ssl : * SSL ) -> c_int ;
147
- pub fn SSL_get_error ( ssl : * SSL , ret : c_int ) -> c_int ;
148
- pub fn SSL_read ( ssl : * SSL , buf : * c_void , num : c_int ) -> c_int ;
149
- pub fn SSL_write ( ssl : * SSL , buf : * c_void , num : c_int ) -> c_int ;
132
+ pub fn SSL_CTX_get_ex_data ( ctx : * mut SSL_CTX , idx : c_int ) -> * mut c_void ;
133
+
134
+ pub fn X509_STORE_CTX_get_ex_data ( ctx : * mut X509_STORE_CTX , idx : c_int )
135
+ -> * mut c_void ;
136
+ pub fn X509_STORE_CTX_get_current_cert ( ct : * mut X509_STORE_CTX ) -> * mut X509 ;
137
+ pub fn X509_STORE_CTX_get_error ( ctx : * mut X509_STORE_CTX ) -> c_int ;
138
+
139
+ pub fn X509_get_subject_name ( x : * mut X509 ) -> * mut X509_NAME ;
140
+
141
+ pub fn SSL_new ( ctx : * mut SSL_CTX ) -> * mut SSL ;
142
+ pub fn SSL_free ( ssl : * mut SSL ) ;
143
+ pub fn SSL_set_bio ( ssl : * mut SSL , rbio : * mut BIO , wbio : * mut BIO ) ;
144
+ pub fn SSL_get_rbio ( ssl : * mut SSL ) -> * mut BIO ;
145
+ pub fn SSL_get_wbio ( ssl : * mut SSL ) -> * mut BIO ;
146
+ pub fn SSL_connect ( ssl : * mut SSL ) -> c_int ;
147
+ pub fn SSL_get_error ( ssl : * mut SSL , ret : c_int ) -> c_int ;
148
+ pub fn SSL_read ( ssl : * mut SSL , buf : * mut c_void , num : c_int ) -> c_int ;
149
+ pub fn SSL_write ( ssl : * mut SSL , buf : * const c_void , num : c_int ) -> c_int ;
150
150
pub fn SSL_get_ex_data_X509_STORE_CTX_idx ( ) -> c_int ;
151
- pub fn SSL_get_SSL_CTX ( ssl : * SSL ) -> * SSL_CTX ;
151
+ pub fn SSL_get_SSL_CTX ( ssl : * mut SSL ) -> * mut SSL_CTX ;
152
152
153
- pub fn BIO_s_mem ( ) -> * BIO_METHOD ;
154
- pub fn BIO_new ( type_ : * BIO_METHOD ) -> * BIO ;
155
- pub fn BIO_free_all ( a : * BIO ) ;
156
- pub fn BIO_read ( b : * BIO , buf : * c_void , len : c_int ) -> c_int ;
157
- pub fn BIO_write ( b : * BIO , buf : * c_void , len : c_int ) -> c_int ;
153
+ pub fn BIO_s_mem ( ) -> * const BIO_METHOD ;
154
+ pub fn BIO_new ( type_ : * const BIO_METHOD ) -> * mut BIO ;
155
+ pub fn BIO_free_all ( a : * mut BIO ) ;
156
+ pub fn BIO_read ( b : * mut BIO , buf : * mut c_void , len : c_int ) -> c_int ;
157
+ pub fn BIO_write ( b : * mut BIO , buf : * const c_void , len : c_int ) -> c_int ;
158
158
}
159
159
160
160
#[ cfg( target_os = "win32" ) ]
0 commit comments