@@ -3,7 +3,6 @@ use std::sync::{Once, ONCE_INIT};
3
3
use std:: mem;
4
4
5
5
use libc:: { c_int, c_char, c_void, c_long, c_uchar, size_t, c_uint, c_ulong} ;
6
- #[ cfg( not( ossl101) ) ]
7
6
use libc:: time_t;
8
7
9
8
#[ repr( C ) ]
@@ -88,7 +87,6 @@ pub struct RSA {
88
87
pub _method_mod_p : * mut :: BN_MONT_CTX ,
89
88
pub _method_mod_q : * mut :: BN_MONT_CTX ,
90
89
91
- pub bignum_data : * mut c_char ,
92
90
pub blinding : * mut :: BN_BLINDING ,
93
91
pub mt_blinding : * mut :: BN_BLINDING ,
94
92
}
@@ -155,7 +153,6 @@ pub struct BIO {
155
153
#[ repr( C ) ]
156
154
pub struct CRYPTO_EX_DATA {
157
155
pub sk : * mut :: stack_st_void ,
158
- pub dummy : c_int ,
159
156
}
160
157
161
158
#[ repr( C ) ]
@@ -258,10 +255,6 @@ pub struct X509 {
258
255
crldp : * mut c_void ,
259
256
altname : * mut c_void ,
260
257
nc : * mut c_void ,
261
- #[ cfg( not( osslconf = "OPENSSL_NO_RFC3779" ) ) ]
262
- rfc3779_addr : * mut c_void ,
263
- #[ cfg( not( osslconf = "OPENSSL_NO_RFC3779" ) ) ]
264
- rfc3779_asid : * mut c_void ,
265
258
#[ cfg( not( osslconf = "OPENSSL_NO_SHA" ) ) ]
266
259
sha1_hash : [ c_uchar ; 20 ] ,
267
260
aux : * mut c_void ,
@@ -346,99 +339,26 @@ pub struct SSL_CTX {
346
339
#[ cfg( not( osslconf = "OPENSSL_NO_ENGINE" ) ) ]
347
340
client_cert_engine : * mut c_void ,
348
341
349
- #[ cfg( not( osslconf = "OPENSSL_NO_TLSEXT" ) ) ]
350
342
tlsext_servername_callback : * mut c_void ,
351
- #[ cfg( not( osslconf = "OPENSSL_NO_TLSEXT" ) ) ]
352
343
tlsect_servername_arg : * mut c_void ,
353
- #[ cfg( not( osslconf = "OPENSSL_NO_TLSEXT" ) ) ]
354
344
tlsext_tick_key_name : [ c_uchar ; 16 ] ,
355
- #[ cfg( not( osslconf = "OPENSSL_NO_TLSEXT" ) ) ]
356
345
tlsext_tick_hmac_key : [ c_uchar ; 16 ] ,
357
- #[ cfg( not( osslconf = "OPENSSL_NO_TLSEXT" ) ) ]
358
346
tlsext_tick_aes_key : [ c_uchar ; 16 ] ,
359
- #[ cfg( not( osslconf = "OPENSSL_NO_TLSEXT" ) ) ]
360
347
tlsext_ticket_key_cb : * mut c_void ,
361
- #[ cfg( not( osslconf = "OPENSSL_NO_TLSEXT" ) ) ]
362
348
tlsext_status_cb : * mut c_void ,
363
- #[ cfg( not( osslconf = "OPENSSL_NO_TLSEXT" ) ) ]
364
349
tlsext_status_arg : * mut c_void ,
365
- #[ cfg( not( osslconf = "OPENSSL_NO_TLSEXT" ) ) ]
366
350
tlsext_opaque_prf_input_callback : * mut c_void ,
367
- #[ cfg( not( osslconf = "OPENSSL_NO_TLSEXT" ) ) ]
368
351
tlsext_opaque_prf_input_callback_arg : * mut c_void ,
369
352
370
- #[ cfg( not( osslconf = "OPENSSL_NO_PSK" ) ) ]
371
- psk_identity_hint : * mut c_void ,
372
- #[ cfg( not( osslconf = "OPENSSL_NO_PSK" ) ) ]
373
- psk_client_callback : * mut c_void ,
374
- #[ cfg( not( osslconf = "OPENSSL_NO_PSK" ) ) ]
375
- psk_server_callback : * mut c_void ,
376
-
377
- #[ cfg( not( osslconf = "OPENSSL_NO_BUF_FREELISTS" ) ) ]
378
- freelist_max_len : c_uint ,
379
- #[ cfg( not( osslconf = "OPENSSL_NO_BUF_FREELISTS" ) ) ]
380
- wbuf_freelist : * mut c_void ,
381
- #[ cfg( not( osslconf = "OPENSSL_NO_BUF_FREELISTS" ) ) ]
382
- rbuf_freelist : * mut c_void ,
383
-
384
- #[ cfg( not( osslconf = "OPENSSL_NO_SRP" ) ) ]
385
- srp_ctx : SRP_CTX ,
386
-
387
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , not( osslconf = "OPENSSL_NO_NEXTPROTONEG" ) ) ) ]
388
353
next_protos_advertised_cb : * mut c_void ,
389
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , not( osslconf = "OPENSSL_NO_NEXTPROTONEG" ) ) ) ]
390
354
next_protos_advertised_cb_arg : * mut c_void ,
391
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , not( osslconf = "OPENSSL_NO_NEXTPROTONEG" ) ) ) ]
392
355
next_proto_select_cb : * mut c_void ,
393
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , not( osslconf = "OPENSSL_NO_NEXTPROTONEG" ) ) ) ]
394
356
next_proto_select_cb_arg : * mut c_void ,
395
357
396
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , ossl101) ) ]
397
- srtp_profiles : * mut c_void ,
398
-
399
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , ossl102) ) ]
400
358
srtp_profiles : * mut c_void ,
401
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , ossl102) ) ]
402
- alpn_select_cb : * mut c_void ,
403
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , ossl102) ) ]
404
- alpn_select_cb_arg : * mut c_void ,
405
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , ossl102) ) ]
406
- alpn_client_proto_list : * mut c_void ,
407
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , ossl102) ) ]
408
- alpn_client_proto_list_len : c_uint ,
409
-
410
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , not( osslconf = "OPENSSL_NO_EC" ) , ossl102) ) ]
411
- tlsext_ecpointformatlist_length : size_t ,
412
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , not( osslconf = "OPENSSL_NO_EC" ) , ossl102) ) ]
413
- tlsext_ecpointformatlist : * mut c_uchar ,
414
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , not( osslconf = "OPENSSL_NO_EC" ) , ossl102) ) ]
415
- tlsext_ellipticcurvelist_length : size_t ,
416
- #[ cfg( all( not( osslconf = "OPENSSL_NO_TLSEXT" ) , not( osslconf = "OPENSSL_NO_EC" ) , ossl102) ) ]
417
- tlsext_ellipticcurvelist : * mut c_uchar ,
418
- }
419
-
420
- #[ repr( C ) ]
421
- pub struct SRP_CTX {
422
- SRP_cb_arg : * mut c_void ,
423
- TLS_ext_srp_username_callback : * mut c_void ,
424
- SRP_verify_param_callback : * mut c_void ,
425
- SRP_give_srp_client_pwd_callback : * mut c_void ,
426
- login : * mut c_void ,
427
- N : * mut c_void ,
428
- g : * mut c_void ,
429
- s : * mut c_void ,
430
- B : * mut c_void ,
431
- A : * mut c_void ,
432
- a : * mut c_void ,
433
- b : * mut c_void ,
434
- v : * mut c_void ,
435
- info : * mut c_void ,
436
- stringth : c_int ,
437
- srp_Mask : c_ulong ,
438
359
}
439
360
440
361
#[ repr( C ) ]
441
- #[ cfg( not( ossl101) ) ]
442
362
pub struct X509_VERIFY_PARAM {
443
363
pub name : * mut c_char ,
444
364
pub check_time : time_t ,
@@ -448,27 +368,30 @@ pub struct X509_VERIFY_PARAM {
448
368
pub trust : c_int ,
449
369
pub depth : c_int ,
450
370
pub policies : * mut stack_st_ASN1_OBJECT ,
451
- pub id : * mut X509_VERIFY_PARAM_ID ,
371
+ // pub id: *mut X509_VERIFY_PARAM_ID,
452
372
}
453
373
454
- #[ cfg( not( ossl101) ) ]
455
374
pub enum X509_VERIFY_PARAM_ID { }
456
375
457
376
pub const SSL_CTRL_OPTIONS : c_int = 32 ;
458
377
pub const SSL_CTRL_CLEAR_OPTIONS : c_int = 77 ;
459
- #[ cfg( ossl102) ]
460
378
pub const SSL_CTRL_SET_ECDH_AUTO : c_int = 94 ;
461
379
462
- pub const SSL_OP_MICROSOFT_SESS_ID_BUG : c_ulong = 0x00000001 ;
463
- pub const SSL_OP_NETSCAPE_CHALLENGE_BUG : c_ulong = 0x00000002 ;
464
- pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG : c_ulong = 0x00000008 ;
465
- pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER : c_ulong = 0x00000020 ;
466
- pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG : c_ulong = 0x00000080 ;
467
- pub const SSL_OP_TLS_D5_BUG : c_ulong = 0x00000100 ;
468
- pub const SSL_OP_TLS_BLOCK_PADDING_BUG : c_ulong = 0x00000200 ;
380
+ pub const SSL_OP_ALL : c_ulong = 0x80000014 ;
381
+ pub const SSL_OP_CISCO_ANYCONNECT : c_ulong = 0x0 ;
382
+ pub const SSL_OP_NO_COMPRESSION : c_ulong = 0x0 ;
383
+ pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION : c_ulong = 0x0 ;
384
+ pub const SSL_OP_NO_SSLv3 : c_ulong = 0x0 ;
385
+ pub const SSL_OP_MICROSOFT_SESS_ID_BUG : c_ulong = 0x0 ;
386
+ pub const SSL_OP_NETSCAPE_CHALLENGE_BUG : c_ulong = 0x0 ;
387
+ pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG : c_ulong = 0x0 ;
388
+ pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER : c_ulong = 0x0 ;
389
+ pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG : c_ulong = 0x0 ;
390
+ pub const SSL_OP_TLS_D5_BUG : c_ulong = 0x0 ;
391
+ pub const SSL_OP_TLS_BLOCK_PADDING_BUG : c_ulong = 0x0 ;
469
392
pub const SSL_OP_SINGLE_ECDH_USE : c_ulong = 0x00080000 ;
470
393
pub const SSL_OP_SINGLE_DH_USE : c_ulong = 0x00100000 ;
471
- pub const SSL_OP_NO_SSLv2 : c_ulong = 0x01000000 ;
394
+ pub const SSL_OP_NO_SSLv2 : c_ulong = 0x0 ;
472
395
473
396
pub const SSLEAY_VERSION : c_int = 0 ;
474
397
pub const SSLEAY_CFLAGS : c_int = 2 ;
@@ -534,12 +457,10 @@ fn set_id_callback() {}
534
457
535
458
// macros
536
459
537
- #[ cfg( ossl102) ]
538
460
pub unsafe fn SSL_CTX_set_ecdh_auto ( ctx : * mut SSL_CTX , onoff : c_int ) -> c_int {
539
461
:: SSL_CTX_ctrl ( ctx, SSL_CTRL_SET_ECDH_AUTO , onoff as c_long , :: std:: ptr:: null_mut ( ) ) as c_int
540
462
}
541
463
542
- #[ cfg( ossl102) ]
543
464
pub unsafe fn SSL_set_ecdh_auto ( ssl : * mut :: SSL , onoff : c_int ) -> c_int {
544
465
:: SSL_ctrl ( ssl, SSL_CTRL_SET_ECDH_AUTO , onoff as c_long , :: std:: ptr:: null_mut ( ) ) as c_int
545
466
}
@@ -578,15 +499,11 @@ extern {
578
499
pub fn OPENSSL_add_all_algorithms_noconf ( ) ;
579
500
pub fn HMAC_CTX_init ( ctx : * mut :: HMAC_CTX ) ;
580
501
pub fn HMAC_CTX_cleanup ( ctx : * mut :: HMAC_CTX ) ;
581
- #[ cfg( not( osslconf = "OPENSSL_NO_SSL3_METHOD" ) ) ]
582
- pub fn SSLv3_method ( ) -> * const :: SSL_METHOD ;
583
502
pub fn TLSv1_method ( ) -> * const :: SSL_METHOD ;
584
503
pub fn SSLv23_method ( ) -> * const :: SSL_METHOD ;
585
504
pub fn TLSv1_1_method ( ) -> * const :: SSL_METHOD ;
586
505
pub fn TLSv1_2_method ( ) -> * const :: SSL_METHOD ;
587
506
pub fn DTLSv1_method ( ) -> * const :: SSL_METHOD ;
588
- #[ cfg( ossl102) ]
589
- pub fn DTLSv1_2_method ( ) -> * const :: SSL_METHOD ;
590
507
pub fn SSL_get_ex_new_index ( argl : c_long , argp : * mut c_void ,
591
508
new_func : Option < :: CRYPTO_EX_new > ,
592
509
dup_func : Option < :: CRYPTO_EX_dup > ,
0 commit comments