View | Details | Raw Unified | Return to bug 237495 | Differences between
and this patch

Collapse All | Expand All

(-)vendor/openssl-sys/build/cfgs.rs (+6 lines)
Lines 13-18 Link Here
13
        if libressl_version >= 0x2_07_00_00_0 {
13
        if libressl_version >= 0x2_07_00_00_0 {
14
            cfgs.push("libressl270");
14
            cfgs.push("libressl270");
15
        }
15
        }
16
        if libressl_version >= 0x2_07_01_00_0 {
17
            cfgs.push("libressl271");
18
        }
16
        if libressl_version >= 0x2_07_03_00_0 {
19
        if libressl_version >= 0x2_07_03_00_0 {
17
            cfgs.push("libressl273");
20
            cfgs.push("libressl273");
18
        }
21
        }
Lines 22-27 Link Here
22
        if libressl_version >= 0x2_08_01_00_0 {
25
        if libressl_version >= 0x2_08_01_00_0 {
23
            cfgs.push("libressl281");
26
            cfgs.push("libressl281");
24
        }
27
        }
28
        if libressl_version >= 0x2_09_01_00_0 {
29
            cfgs.push("libressl291");
30
        }
25
    } else {
31
    } else {
26
        let openssl_version = openssl_version.unwrap();
32
        let openssl_version = openssl_version.unwrap();
27
33
(-)vendor/openssl-sys/build/main.rs (-1 / +2 lines)
Lines 505-510 Link Here
505
            (8, 1) => ('8', '1'),
199
            (8, 1) => ('8', '1'),
506
            (8, _) => ('8', 'x'),
200
            (8, _) => ('8', 'x'),
507
            (9, 0) => ('9', '0'),
201
            (9, 0) => ('9', '0'),
202
            (9, _) => ('9', 'x'),
508
            _ => version_error(),
203
            _ => version_error(),
509
        };
204
        };
510
205
Lines 545-551 Link Here
545
        "
240
        "
546
241
547
This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
242
This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
548
through 2.9.0, but a different version of OpenSSL was found. The build is now aborting
243
through 2.9.x, but a different version of OpenSSL was found. The build is now aborting
549
due to this version mismatch.
244
due to this version mismatch.
550
245
551
"
246
"
(-)vendor/openssl-sys/src/crypto.rs (-2 / +8 lines)
Lines 15-21 Link Here
15
    if #[cfg(ossl110)] {
15
    if #[cfg(ossl110)] {
16
        pub const CRYPTO_EX_INDEX_SSL: c_int = 0;
16
        pub const CRYPTO_EX_INDEX_SSL: c_int = 0;
17
        pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1;
17
        pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1;
18
18
    } else if #[cfg(libressl)] {
19
        pub const CRYPTO_EX_INDEX_SSL: c_int = 1;
20
        pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 2;
21
    }
22
}
23
cfg_if! {
24
    if #[cfg(any(ossl110, libressl271))] {
19
        extern "C" {
25
        extern "C" {
20
            pub fn OpenSSL_version_num() -> c_ulong;
26
            pub fn OpenSSL_version_num() -> c_ulong;
21
            pub fn OpenSSL_version(key: c_int) -> *const c_char;
27
            pub fn OpenSSL_version(key: c_int) -> *const c_char;
Lines 64-70 Link Here
64
    argp: *mut c_void,
70
    argp: *mut c_void,
65
);
71
);
66
extern "C" {
72
extern "C" {
67
    #[cfg(ossl110)]
73
    #[cfg(any(ossl110, libressl))]
68
    pub fn CRYPTO_get_ex_new_index(
74
    pub fn CRYPTO_get_ex_new_index(
69
        class_index: c_int,
75
        class_index: c_int,
70
        argl: c_long,
76
        argl: c_long,
(-)vendor/openssl-sys/src/ssl.rs (-1 / +1 lines)
Lines 1032-1038 Link Here
1032
}
1057
}
1033
1058
1034
cfg_if! {
1059
cfg_if! {
1035
    if #[cfg(ossl110)] {
1060
    if #[cfg(any(ossl110, libressl291))] {
1036
        extern "C" {
1061
        extern "C" {
1037
            pub fn TLS_method() -> *const SSL_METHOD;
1062
            pub fn TLS_method() -> *const SSL_METHOD;
1038
1063
(-)vendor/openssl/build.rs (+8 lines)
Lines 46-57 Link Here
46
            println!("cargo:rustc-cfg=libressl270");
46
            println!("cargo:rustc-cfg=libressl270");
47
        }
47
        }
48
48
49
        if version >= 0x2_07_01_00_0 {
50
            println!("cargo:rustc-cfg=libressl271");
51
        }
52
49
        if version >= 0x2_07_03_00_0 {
53
        if version >= 0x2_07_03_00_0 {
50
            println!("cargo:rustc-cfg=libressl273");
54
            println!("cargo:rustc-cfg=libressl273");
51
        }
55
        }
52
56
53
        if version >= 0x2_08_00_00_0 {
57
        if version >= 0x2_08_00_00_0 {
54
            println!("cargo:rustc-cfg=libressl280");
58
            println!("cargo:rustc-cfg=libressl280");
59
        }
60
61
        if version >= 0x2_09_01_00_0 {
62
            println!("cargo:rustc-cfg=libressl291");
55
        }
63
        }
56
    }
64
    }
57
}
65
}
(-)vendor/openssl/src/ssl/mod.rs (-4 / +7 lines)
Lines 3690-3698 Link Here
3690
}
3831
}
3691
3832
3692
cfg_if! {
3833
cfg_if! {
3693
    if #[cfg(ossl110)] {
3834
    if #[cfg(any(ossl110, libressl291))] {
3694
        use ffi::{TLS_method, DTLS_method};
3835
        use ffi::{TLS_method, DTLS_method};
3695
3836
    } else {
3837
        use ffi::{SSLv23_method as TLS_method, DTLSv1_method as DTLS_method};
3838
    }
3839
}
3840
cfg_if! {
3841
    if #[cfg(ossl110)] {
3696
        unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int {
3842
        unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int {
3697
            ffi::CRYPTO_get_ex_new_index(
3843
            ffi::CRYPTO_get_ex_new_index(
3698
                ffi::CRYPTO_EX_INDEX_SSL_CTX,
3844
                ffi::CRYPTO_EX_INDEX_SSL_CTX,
Lines 3715-3722 Link Here
3715
            )
3861
            )
3716
        }
3862
        }
3717
    } else {
3863
    } else {
3718
        use ffi::{SSLv23_method as TLS_method, DTLSv1_method as DTLS_method};
3719
3720
        unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int {
3864
        unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int {
3721
            ffi::SSL_CTX_get_ex_new_index(0, ptr::null_mut(), None, None, Some(f))
3865
            ffi::SSL_CTX_get_ex_new_index(0, ptr::null_mut(), None, None, Some(f))
3722
        }
3866
        }
(-)vendor/openssl/src/version.rs (-1 / +1 lines)
Lines 14-20 Link Here
14
use std::ffi::CStr;
14
use std::ffi::CStr;
15
15
16
cfg_if! {
16
cfg_if! {
17
    if #[cfg(ossl110)] {
17
    if #[cfg(any(ossl110, libressl271))] {
18
        use ffi::{
18
        use ffi::{
19
            OPENSSL_VERSION, OPENSSL_CFLAGS, OPENSSL_BUILT_ON, OPENSSL_PLATFORM, OPENSSL_DIR,
19
            OPENSSL_VERSION, OPENSSL_CFLAGS, OPENSSL_BUILT_ON, OPENSSL_PLATFORM, OPENSSL_DIR,
20
            OpenSSL_version_num, OpenSSL_version,
20
            OpenSSL_version_num, OpenSSL_version,

Return to bug 237495