]> git.proxmox.com Git - rustc.git/blob - src/vendor/openssl-sys/src/libressl/mod.rs
New upstream version 1.19.0+dfsg1
[rustc.git] / src / vendor / openssl-sys / src / libressl / mod.rs
1 use std::sync::{Mutex, MutexGuard};
2 use std::sync::{Once, ONCE_INIT};
3 use std::mem;
4 use std::ptr;
5
6 #[cfg(libressl250)]
7 pub use libressl::v250::*;
8 #[cfg(not(libressl250))]
9 pub use libressl::v25x::*;
10
11 use libc::{c_int, c_char, c_void, c_long, c_uchar, size_t, c_uint, c_ulong};
12
13 #[cfg(libressl250)]
14 mod v250;
15 #[cfg(not(libressl250))]
16 mod v25x;
17
18 #[repr(C)]
19 pub struct stack_st_ASN1_OBJECT {
20 pub stack: _STACK,
21 }
22
23 #[repr(C)]
24 pub struct stack_st_X509 {
25 pub stack: _STACK,
26 }
27
28 #[repr(C)]
29 pub struct stack_st_X509_NAME {
30 pub stack: _STACK,
31 }
32
33 #[repr(C)]
34 pub struct stack_st_X509_ATTRIBUTE {
35 pub stack: _STACK,
36 }
37
38 #[repr(C)]
39 pub struct stack_st_X509_EXTENSION {
40 pub stack: _STACK,
41 }
42
43 #[repr(C)]
44 pub struct stack_st_GENERAL_NAME {
45 pub stack: _STACK,
46 }
47
48 #[repr(C)]
49 pub struct stack_st_void {
50 pub stack: _STACK,
51 }
52
53 #[repr(C)]
54 pub struct stack_st_SSL_CIPHER {
55 pub stack: _STACK,
56 }
57
58 #[repr(C)]
59 pub struct stack_st_OPENSSL_STRING {
60 pub stack: _STACK,
61 }
62
63 #[repr(C)]
64 pub struct _STACK {
65 pub num: c_int,
66 pub data: *mut *mut c_char,
67 pub sorted: c_int,
68 pub num_alloc: c_int,
69 pub comp: Option<unsafe extern fn(*const c_void, *const c_void) -> c_int>,
70 }
71
72 #[repr(C)]
73 pub struct BIO_METHOD {
74 pub type_: c_int,
75 pub name: *const c_char,
76 pub bwrite: Option<unsafe extern fn(*mut ::BIO, *const c_char, c_int) -> c_int>,
77 pub bread: Option<unsafe extern fn(*mut ::BIO, *mut c_char, c_int) -> c_int>,
78 pub bputs: Option<unsafe extern fn(*mut ::BIO, *const c_char) -> c_int>,
79 pub bgets: Option<unsafe extern fn(*mut ::BIO, *mut c_char, c_int) -> c_int>,
80 pub ctrl: Option<unsafe extern fn(*mut ::BIO, c_int, c_long, *mut c_void) -> c_long>,
81 pub create: Option<unsafe extern fn(*mut ::BIO) -> c_int>,
82 pub destroy: Option<unsafe extern fn(*mut ::BIO) -> c_int>,
83 pub callback_ctrl: Option<unsafe extern fn(*mut ::BIO, c_int, ::bio_info_cb) -> c_long>,
84 }
85
86 #[repr(C)]
87 pub struct RSA {
88 pub pad: c_int,
89 pub version: c_long,
90 pub meth: *const ::RSA_METHOD,
91
92 pub engine: *mut ::ENGINE,
93 pub n: *mut ::BIGNUM,
94 pub e: *mut ::BIGNUM,
95 pub d: *mut ::BIGNUM,
96 pub p: *mut ::BIGNUM,
97 pub q: *mut ::BIGNUM,
98 pub dmp1: *mut ::BIGNUM,
99 pub dmq1: *mut ::BIGNUM,
100 pub iqmp: *mut ::BIGNUM,
101
102 pub ex_data: ::CRYPTO_EX_DATA,
103 pub references: c_int,
104 pub flags: c_int,
105
106 pub _method_mod_n: *mut ::BN_MONT_CTX,
107 pub _method_mod_p: *mut ::BN_MONT_CTX,
108 pub _method_mod_q: *mut ::BN_MONT_CTX,
109
110 pub blinding: *mut ::BN_BLINDING,
111 pub mt_blinding: *mut ::BN_BLINDING,
112 }
113
114 #[repr(C)]
115 pub struct DSA {
116 pub pad: c_int,
117 pub version: c_long,
118 pub write_params: c_int,
119
120 pub p: *mut ::BIGNUM,
121 pub q: *mut ::BIGNUM,
122 pub g: *mut ::BIGNUM,
123 pub pub_key: *mut ::BIGNUM,
124 pub priv_key: *mut ::BIGNUM,
125 pub kinv: *mut ::BIGNUM,
126 pub r: *mut ::BIGNUM,
127
128 pub flags: c_int,
129 pub method_mont_p: *mut ::BN_MONT_CTX,
130 pub references: c_int,
131 pub ex_data: ::CRYPTO_EX_DATA,
132 pub meth: *const ::DSA_METHOD,
133 pub engine: *mut ::ENGINE,
134 }
135
136 #[repr(C)]
137 pub struct EVP_PKEY {
138 pub type_: c_int,
139 pub save_type: c_int,
140 pub references: c_int,
141 pub ameth: *const ::EVP_PKEY_ASN1_METHOD,
142 pub engine: *mut ::ENGINE,
143 pub pkey: *mut c_void,
144 pub save_parameters: c_int,
145 pub attributes: *mut stack_st_X509_ATTRIBUTE,
146 }
147
148 #[repr(C)]
149 pub struct BIO {
150 pub method: *mut ::BIO_METHOD,
151 pub callback: Option<unsafe extern fn(*mut ::BIO,
152 c_int,
153 *const c_char,
154 c_int,
155 c_long,
156 c_long)
157 -> c_long>,
158 pub cb_arg: *mut c_char,
159 pub init: c_int,
160 pub shutdown: c_int,
161 pub flags: c_int,
162 pub retry_reason: c_int,
163 pub num: c_int,
164 pub ptr: *mut c_void,
165 pub next_bio: *mut ::BIO,
166 pub prev_bio: *mut ::BIO,
167 pub references: c_int,
168 pub num_read: c_ulong,
169 pub num_write: c_ulong,
170 pub ex_data: ::CRYPTO_EX_DATA,
171 }
172
173 #[repr(C)]
174 pub struct CRYPTO_EX_DATA {
175 pub sk: *mut ::stack_st_void,
176 }
177
178 #[repr(C)]
179 pub struct EVP_MD_CTX {
180 digest: *mut ::EVP_MD,
181 engine: *mut ::ENGINE,
182 flags: c_ulong,
183 md_data: *mut c_void,
184 pctx: *mut ::EVP_PKEY_CTX,
185 update: *mut c_void
186 }
187
188 #[repr(C)]
189 pub struct EVP_CIPHER {
190 pub nid: c_int,
191 pub block_size: c_int,
192 pub key_len: c_int,
193 pub iv_len: c_int,
194 pub flags: c_ulong,
195 pub init: Option<unsafe extern fn(*mut ::EVP_CIPHER_CTX,
196 *const c_uchar,
197 *const c_uchar,
198 c_int) -> c_int>,
199 pub do_cipher: Option<unsafe extern fn(*mut ::EVP_CIPHER_CTX,
200 *mut c_uchar,
201 *const c_uchar,
202 size_t) -> c_int>,
203 pub cleanup: Option<unsafe extern fn(*mut ::EVP_CIPHER_CTX) -> c_int>,
204 pub ctx_size: c_int,
205 pub set_asn1_parameters: Option<unsafe extern fn(*mut ::EVP_CIPHER_CTX,
206 *mut ::ASN1_TYPE) -> c_int>,
207 pub get_asn1_parameters: Option<unsafe extern fn(*mut ::EVP_CIPHER_CTX,
208 *mut ::ASN1_TYPE) -> c_int>,
209 pub ctrl: Option<unsafe extern fn(*mut ::EVP_CIPHER_CTX,
210 c_int,
211 c_int,
212 *mut c_void) -> c_int>,
213 pub app_data: *mut c_void,
214 }
215
216 #[repr(C)]
217 pub struct HMAC_CTX {
218 md: *mut ::EVP_MD,
219 md_ctx: ::EVP_MD_CTX,
220 i_ctx: ::EVP_MD_CTX,
221 o_ctx: ::EVP_MD_CTX,
222 key_length: c_uint,
223 key: [c_uchar; 128]
224 }
225
226 #[repr(C)]
227 pub struct BIGNUM {
228 pub d: *mut ::BN_ULONG,
229 pub top: c_int,
230 pub dmax: c_int,
231 pub neg: c_int,
232 pub flags: c_int,
233 }
234
235 #[repr(C)]
236 pub struct DH {
237 pub pad: c_int,
238 pub version: c_int,
239 pub p: *mut ::BIGNUM,
240 pub g: *mut ::BIGNUM,
241 pub length: c_long,
242 pub pub_key: *mut ::BIGNUM,
243 pub priv_key: *mut ::BIGNUM,
244 pub flags: c_int,
245 pub method_mont_p: *mut ::BN_MONT_CTX,
246 pub q: *mut ::BIGNUM,
247 pub j: *mut ::BIGNUM,
248 pub seed: *mut c_uchar,
249 pub seedlen: c_int,
250 pub counter: *mut ::BIGNUM,
251 pub references: c_int,
252 pub ex_data: ::CRYPTO_EX_DATA,
253 pub meth: *const ::DH_METHOD,
254 pub engine: *mut ::ENGINE,
255 }
256
257 #[repr(C)]
258 pub struct X509 {
259 pub cert_info: *mut X509_CINF,
260 pub sig_alg: *mut ::X509_ALGOR,
261 pub signature: *mut ::ASN1_BIT_STRING,
262 pub valid: c_int,
263 pub references: c_int,
264 pub name: *mut c_char,
265 pub ex_data: ::CRYPTO_EX_DATA,
266 pub ex_pathlen: c_long,
267 pub ex_pcpathlen: c_long,
268 pub ex_flags: c_ulong,
269 pub ex_kusage: c_ulong,
270 pub ex_xkusage: c_ulong,
271 pub ex_nscert: c_ulong,
272 skid: *mut c_void,
273 akid: *mut c_void,
274 policy_cache: *mut c_void,
275 crldp: *mut c_void,
276 altname: *mut c_void,
277 nc: *mut c_void,
278 #[cfg(not(osslconf = "OPENSSL_NO_SHA"))]
279 sha1_hash: [c_uchar; 20],
280 aux: *mut c_void,
281 }
282
283 #[repr(C)]
284 pub struct X509_CINF {
285 version: *mut c_void,
286 serialNumber: *mut c_void,
287 signature: *mut c_void,
288 issuer: *mut c_void,
289 pub validity: *mut X509_VAL,
290 subject: *mut c_void,
291 key: *mut c_void,
292 issuerUID: *mut c_void,
293 subjectUID: *mut c_void,
294 pub extensions: *mut stack_st_X509_EXTENSION,
295 enc: ASN1_ENCODING,
296 }
297
298 #[repr(C)]
299 pub struct X509_ALGOR {
300 pub algorithm: *mut ::ASN1_OBJECT,
301 parameter: *mut c_void,
302 }
303
304 #[repr(C)]
305 pub struct ASN1_ENCODING {
306 pub enc: *mut c_uchar,
307 pub len: c_long,
308 pub modified: c_int,
309 }
310
311 #[repr(C)]
312 pub struct X509_VAL {
313 pub notBefore: *mut ::ASN1_TIME,
314 pub notAfter: *mut ::ASN1_TIME,
315 }
316
317 #[repr(C)]
318 pub struct X509_REQ_INFO {
319 pub enc: ASN1_ENCODING,
320 pub version: *mut ::ASN1_INTEGER,
321 pub subject: *mut ::X509_NAME,
322 pubkey: *mut c_void,
323 pub attributes: *mut stack_st_X509_ATTRIBUTE
324 }
325
326 #[repr(C)]
327 pub struct X509_REQ {
328 pub req_info: *mut X509_REQ_INFO,
329 sig_alg: *mut c_void,
330 signature: *mut c_void,
331 references: c_int
332 }
333
334 pub enum X509_VERIFY_PARAM_ID {}
335 pub enum PKCS12 {}
336
337 pub const SSL_CTRL_GET_SESSION_REUSED: c_int = 8;
338 pub const SSL_CTRL_OPTIONS: c_int = 32;
339 pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77;
340 pub const SSL_CTRL_SET_ECDH_AUTO: c_int = 94;
341
342 pub const SSL_OP_ALL: c_ulong = 0x80000014;
343 pub const SSL_OP_CISCO_ANYCONNECT: c_ulong = 0x0;
344 pub const SSL_OP_NO_COMPRESSION: c_ulong = 0x0;
345 pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: c_ulong = 0x0;
346 pub const SSL_OP_NO_SSLv3: c_ulong = 0x0;
347 pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x0;
348 pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x0;
349 pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x0;
350 pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x0;
351 pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x0;
352 pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x0;
353 pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x0;
354 pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00080000;
355 pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00100000;
356 pub const SSL_OP_NO_SSLv2: c_ulong = 0x0;
357
358 pub const SSL_MAX_SSL_SESSION_ID_LENGTH: c_int = 32;
359 pub const SSL_MAX_SID_CTX_LENGTH: c_int = 32;
360 pub const SSL_MAX_MASTER_KEY_LENGTH: c_int = 48;
361
362 pub const SSLEAY_VERSION : c_int = 0;
363 pub const SSLEAY_CFLAGS : c_int = 2;
364 pub const SSLEAY_BUILT_ON : c_int = 3;
365 pub const SSLEAY_PLATFORM : c_int = 4;
366 pub const SSLEAY_DIR : c_int = 5;
367
368 pub const CRYPTO_LOCK_X509: c_int = 3;
369 pub const CRYPTO_LOCK_SSL_CTX: c_int = 12;
370 pub const CRYPTO_LOCK_SSL_SESSION: c_int = 14;
371
372 static mut MUTEXES: *mut Vec<Mutex<()>> = 0 as *mut Vec<Mutex<()>>;
373 static mut GUARDS: *mut Vec<Option<MutexGuard<'static, ()>>> = 0 as *mut Vec<Option<MutexGuard<'static, ()>>>;
374
375 unsafe extern fn locking_function(mode: c_int, n: c_int, _file: *const c_char,
376 _line: c_int) {
377 let mutex = &(*MUTEXES)[n as usize];
378
379 if mode & ::CRYPTO_LOCK != 0 {
380 (*GUARDS)[n as usize] = Some(mutex.lock().unwrap());
381 } else {
382 &(*GUARDS)[n as usize].take().expect("lock already unlocked");
383 }
384 }
385
386 pub fn init() {
387 static INIT: Once = ONCE_INIT;
388
389 INIT.call_once(|| {
390 unsafe {
391 SSL_library_init();
392 SSL_load_error_strings();
393 OPENSSL_add_all_algorithms_noconf();
394
395 let num_locks = ::CRYPTO_num_locks();
396 let mut mutexes = Box::new(Vec::new());
397 for _ in 0..num_locks {
398 mutexes.push(Mutex::new(()));
399 }
400 MUTEXES = mem::transmute(mutexes);
401 let guards: Box<Vec<Option<MutexGuard<()>>>> =
402 Box::new((0..num_locks).map(|_| None).collect());
403 GUARDS = mem::transmute(guards);
404
405 CRYPTO_set_locking_callback(locking_function);
406 set_id_callback();
407 }
408 })
409 }
410
411 #[cfg(unix)]
412 fn set_id_callback() {
413 unsafe extern fn thread_id() -> c_ulong {
414 ::libc::pthread_self() as c_ulong
415 }
416
417 unsafe {
418 CRYPTO_set_id_callback(thread_id);
419 }
420 }
421
422 #[cfg(not(unix))]
423 fn set_id_callback() {}
424
425 // macros
426
427 pub unsafe fn SSL_CTX_set_ecdh_auto(ctx: *mut SSL_CTX, onoff: c_int) -> c_int {
428 ::SSL_CTX_ctrl(ctx, SSL_CTRL_SET_ECDH_AUTO, onoff as c_long, ptr::null_mut()) as c_int
429 }
430
431 pub unsafe fn SSL_set_ecdh_auto(ssl: *mut ::SSL, onoff: c_int) -> c_int {
432 ::SSL_ctrl(ssl, SSL_CTRL_SET_ECDH_AUTO, onoff as c_long, ptr::null_mut()) as c_int
433 }
434
435 pub unsafe fn SSL_session_reused(ssl: *mut ::SSL) -> c_int {
436 ::SSL_ctrl(ssl, SSL_CTRL_GET_SESSION_REUSED, 0, ptr::null_mut()) as c_int
437 }
438
439 extern {
440 pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO;
441 pub fn BIO_s_file() -> *mut BIO_METHOD;
442 pub fn BIO_s_mem() -> *mut BIO_METHOD;
443
444 pub fn get_rfc2409_prime_768(bn: *mut BIGNUM) -> *mut BIGNUM;
445 pub fn get_rfc2409_prime_1024(bn: *mut BIGNUM) -> *mut BIGNUM;
446 pub fn get_rfc3526_prime_1536(bn: *mut BIGNUM) -> *mut BIGNUM;
447 pub fn get_rfc3526_prime_2048(bn: *mut BIGNUM) -> *mut BIGNUM;
448 pub fn get_rfc3526_prime_3072(bn: *mut BIGNUM) -> *mut BIGNUM;
449 pub fn get_rfc3526_prime_4096(bn: *mut BIGNUM) -> *mut BIGNUM;
450 pub fn get_rfc3526_prime_6144(bn: *mut BIGNUM) -> *mut BIGNUM;
451 pub fn get_rfc3526_prime_8192(bn: *mut BIGNUM) -> *mut BIGNUM;
452
453 pub fn CRYPTO_malloc(num: c_int, file: *const c_char, line: c_int) -> *mut c_void;
454 pub fn CRYPTO_free(buf: *mut c_void);
455 pub fn CRYPTO_num_locks() -> c_int;
456 pub fn CRYPTO_set_locking_callback(func: unsafe extern "C" fn(mode: c_int,
457 n: c_int,
458 file: *const c_char,
459 line: c_int));
460 pub fn CRYPTO_set_id_callback(func: unsafe extern "C" fn() -> c_ulong);
461
462 pub fn ERR_load_crypto_strings();
463
464 pub fn RSA_generate_key(modsz: c_int,
465 e: c_ulong,
466 cb: Option<extern fn(c_int, c_int, *mut c_void)>,
467 cbarg: *mut c_void) -> *mut RSA;
468
469 pub fn OCSP_cert_to_id(dgst: *const ::EVP_MD, subject: *mut ::X509, issuer: *mut ::X509) -> *mut ::OCSP_CERTID;
470
471 pub fn PKCS12_create(pass: *mut c_char,
472 friendly_name: *mut c_char,
473 pkey: *mut EVP_PKEY,
474 cert: *mut X509,
475 ca: *mut stack_st_X509,
476 nid_key: c_int,
477 nid_cert: c_int,
478 iter: c_int,
479 mac_iter: c_int,
480 keytype: c_int) -> *mut PKCS12;
481
482 pub fn SSL_library_init() -> c_int;
483 pub fn SSL_load_error_strings();
484 pub fn OPENSSL_add_all_algorithms_noconf();
485 pub fn HMAC_CTX_init(ctx: *mut ::HMAC_CTX);
486 pub fn HMAC_CTX_cleanup(ctx: *mut ::HMAC_CTX);
487 pub fn TLSv1_method() -> *const ::SSL_METHOD;
488 pub fn SSLv23_method() -> *const ::SSL_METHOD;
489 pub fn TLSv1_1_method() -> *const ::SSL_METHOD;
490 pub fn TLSv1_2_method() -> *const ::SSL_METHOD;
491 pub fn DTLSv1_method() -> *const ::SSL_METHOD;
492 pub fn SSL_get_ex_new_index(argl: c_long, argp: *mut c_void,
493 new_func: Option<::CRYPTO_EX_new>,
494 dup_func: Option<::CRYPTO_EX_dup>,
495 free_func: Option<::CRYPTO_EX_free>)
496 -> c_int;
497 pub fn SSL_set_tmp_ecdh_callback(ssl: *mut ::SSL,
498 ecdh: unsafe extern fn(ssl: *mut ::SSL,
499 is_export: c_int,
500 keylength: c_int)
501 -> *mut ::EC_KEY);
502 pub fn SSL_CIPHER_get_version(cipher: *const ::SSL_CIPHER) -> *mut c_char;
503 pub fn SSL_CTX_get_ex_new_index(argl: c_long, argp: *mut c_void,
504 new_func: Option<::CRYPTO_EX_new>,
505 dup_func: Option<::CRYPTO_EX_dup>,
506 free_func: Option<::CRYPTO_EX_free>)
507 -> c_int;
508 pub fn SSL_CTX_set_tmp_ecdh_callback(ctx: *mut ::SSL_CTX,
509 ecdh: unsafe extern fn(ssl: *mut ::SSL,
510 is_export: c_int,
511 keylength: c_int)
512 -> *mut ::EC_KEY);
513 pub fn X509_get_subject_name(x: *mut ::X509) -> *mut ::X509_NAME;
514 pub fn X509_set_notAfter(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int;
515 pub fn X509_set_notBefore(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int;
516 pub fn X509_get_ext_d2i(x: *mut ::X509, nid: c_int, crit: *mut c_int, idx: *mut c_int) -> *mut c_void;
517 pub fn X509_NAME_add_entry_by_NID(x: *mut ::X509_NAME, field: c_int, ty: c_int, bytes: *mut c_uchar, len: c_int, loc: c_int, set: c_int) -> c_int;
518 pub fn X509_NAME_get_entry(n: *mut ::X509_NAME, loc: c_int) -> *mut ::X509_NAME_ENTRY;
519 pub fn X509_NAME_ENTRY_get_data(ne: *mut ::X509_NAME_ENTRY) -> *mut ::ASN1_STRING;
520 pub fn X509_STORE_CTX_get_chain(ctx: *mut ::X509_STORE_CTX) -> *mut stack_st_X509;
521 pub fn X509V3_EXT_nconf_nid(conf: *mut ::CONF, ctx: *mut ::X509V3_CTX, ext_nid: c_int, value: *mut c_char) -> *mut ::X509_EXTENSION;
522 pub fn X509V3_EXT_nconf(conf: *mut ::CONF, ctx: *mut ::X509V3_CTX, name: *mut c_char, value: *mut c_char) -> *mut ::X509_EXTENSION;
523 pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: *mut ::ASN1_STRING) -> c_int;
524 pub fn ASN1_STRING_data(x: *mut ::ASN1_STRING) -> *mut c_uchar;
525 pub fn CRYPTO_add_lock(pointer: *mut c_int,
526 amount: c_int,
527 type_: c_int,
528 file: *const c_char,
529 line: c_int) -> c_int;
530 pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX;
531 pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX);
532 pub fn EVP_PKEY_bits(key: *mut EVP_PKEY) -> c_int;
533
534 pub fn sk_new_null() -> *mut _STACK;
535 pub fn sk_num(st: *const _STACK) -> c_int;
536 pub fn sk_value(st: *const _STACK, n: c_int) -> *mut c_void;
537 pub fn sk_free(st: *mut _STACK);
538 pub fn sk_push(st: *mut _STACK, data: *mut c_void) -> c_int;
539 pub fn sk_pop_free(st: *mut _STACK, free: Option<unsafe extern "C" fn (*mut c_void)>);
540 pub fn sk_pop(st: *mut _STACK) -> *mut c_void;
541
542 pub fn SSLeay() -> c_ulong;
543 pub fn SSLeay_version(key: c_int) -> *const c_char;
544 }