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

Collapse All | Expand All

(-)vendor/openssl/build.rs (+6 lines)
Lines 67-72 Link Here
67
        if version >= 0x3_07_00_00_0 {
67
        if version >= 0x3_07_00_00_0 {
68
            println!("cargo:rustc-cfg=libressl370");
68
            println!("cargo:rustc-cfg=libressl370");
69
        }
69
        }
70
        if version >= 0x3_08_00_00_0 {
71
            println!("cargo:rustc-cfg=libressl380");
72
        }
73
        if version >= 0x3_09_00_00_0 {
74
            println!("cargo:rustc-cfg=libressl390");
75
        }
70
    }
76
    }
71
77
72
    if let Ok(vars) = env::var("DEP_OPENSSL_CONF") {
78
    if let Ok(vars) = env::var("DEP_OPENSSL_CONF") {
(-)vendor/openssl/src/hash.rs (-8 / +8 lines)
Lines 127-148 Link Here
127
        unsafe { MessageDigest(ffi::EVP_sha512()) }
127
        unsafe { MessageDigest(ffi::EVP_sha512()) }
128
    }
128
    }
129
129
130
    #[cfg(ossl111)]
130
    #[cfg(any(ossl111, libressl380))]
131
    pub fn sha3_224() -> MessageDigest {
131
    pub fn sha3_224() -> MessageDigest {
132
        unsafe { MessageDigest(ffi::EVP_sha3_224()) }
132
        unsafe { MessageDigest(ffi::EVP_sha3_224()) }
133
    }
133
    }
134
134
135
    #[cfg(ossl111)]
135
    #[cfg(any(ossl111, libressl380))]
136
    pub fn sha3_256() -> MessageDigest {
136
    pub fn sha3_256() -> MessageDigest {
137
        unsafe { MessageDigest(ffi::EVP_sha3_256()) }
137
        unsafe { MessageDigest(ffi::EVP_sha3_256()) }
138
    }
138
    }
139
139
140
    #[cfg(ossl111)]
140
    #[cfg(any(ossl111, libressl380))]
141
    pub fn sha3_384() -> MessageDigest {
141
    pub fn sha3_384() -> MessageDigest {
142
        unsafe { MessageDigest(ffi::EVP_sha3_384()) }
142
        unsafe { MessageDigest(ffi::EVP_sha3_384()) }
143
    }
143
    }
144
144
145
    #[cfg(ossl111)]
145
    #[cfg(any(ossl111, libressl380))]
146
    pub fn sha3_512() -> MessageDigest {
146
    pub fn sha3_512() -> MessageDigest {
147
        unsafe { MessageDigest(ffi::EVP_sha3_512()) }
147
        unsafe { MessageDigest(ffi::EVP_sha3_512()) }
148
    }
148
    }
Lines 624-630 Link Here
624
        );
624
        );
625
    }
625
    }
626
626
627
    #[cfg(ossl111)]
627
    #[cfg(any(ossl111, libressl380))]
628
    #[test]
628
    #[test]
629
    fn test_sha3_224() {
629
    fn test_sha3_224() {
630
        let tests = [(
630
        let tests = [(
Lines 644-650 Link Here
644
        );
644
        );
645
    }
645
    }
646
646
647
    #[cfg(ossl111)]
647
    #[cfg(any(ossl111, libressl380))]
648
    #[test]
648
    #[test]
649
    fn test_sha3_256() {
649
    fn test_sha3_256() {
650
        let tests = [(
650
        let tests = [(
Lines 664-670 Link Here
664
        );
664
        );
665
    }
665
    }
666
666
667
    #[cfg(ossl111)]
667
    #[cfg(any(ossl111, libressl380))]
668
    #[test]
668
    #[test]
669
    fn test_sha3_384() {
669
    fn test_sha3_384() {
670
        let tests = [("416c6c20796f75722062617365206172652062656c6f6e6720746f207573",
670
        let tests = [("416c6c20796f75722062617365206172652062656c6f6e6720746f207573",
Lines 684-690 Link Here
684
        );
684
        );
685
    }
685
    }
686
686
687
    #[cfg(ossl111)]
687
    #[cfg(any(ossl111, libressl380))]
688
    #[test]
688
    #[test]
689
    fn test_sha3_512() {
689
    fn test_sha3_512() {
690
        let tests = [("416c6c20796f75722062617365206172652062656c6f6e6720746f207573",
690
        let tests = [("416c6c20796f75722062617365206172652062656c6f6e6720746f207573",
(-)vendor/openssl/src/md.rs (-4 / +4 lines)
Lines 150-174 Link Here
150
        unsafe { MdRef::from_ptr(ffi::EVP_sha512() as *mut _) }
150
        unsafe { MdRef::from_ptr(ffi::EVP_sha512() as *mut _) }
151
    }
151
    }
152
152
153
    #[cfg(ossl111)]
153
    #[cfg(any(ossl111, libressl380))]
154
    #[inline]
154
    #[inline]
155
    pub fn sha3_224() -> &'static MdRef {
155
    pub fn sha3_224() -> &'static MdRef {
156
        unsafe { MdRef::from_ptr(ffi::EVP_sha3_224() as *mut _) }
156
        unsafe { MdRef::from_ptr(ffi::EVP_sha3_224() as *mut _) }
157
    }
157
    }
158
158
159
    #[cfg(ossl111)]
159
    #[cfg(any(ossl111, libressl380))]
160
    #[inline]
160
    #[inline]
161
    pub fn sha3_256() -> &'static MdRef {
161
    pub fn sha3_256() -> &'static MdRef {
162
        unsafe { MdRef::from_ptr(ffi::EVP_sha3_256() as *mut _) }
162
        unsafe { MdRef::from_ptr(ffi::EVP_sha3_256() as *mut _) }
163
    }
163
    }
164
164
165
    #[cfg(ossl111)]
165
    #[cfg(any(ossl111, libressl380))]
166
    #[inline]
166
    #[inline]
167
    pub fn sha3_384() -> &'static MdRef {
167
    pub fn sha3_384() -> &'static MdRef {
168
        unsafe { MdRef::from_ptr(ffi::EVP_sha3_384() as *mut _) }
168
        unsafe { MdRef::from_ptr(ffi::EVP_sha3_384() as *mut _) }
169
    }
169
    }
170
170
171
    #[cfg(ossl111)]
171
    #[cfg(any(ossl111, libressl380))]
172
    #[inline]
172
    #[inline]
173
    pub fn sha3_512() -> &'static MdRef {
173
    pub fn sha3_512() -> &'static MdRef {
174
        unsafe { MdRef::from_ptr(ffi::EVP_sha3_512() as *mut _) }
174
        unsafe { MdRef::from_ptr(ffi::EVP_sha3_512() as *mut _) }
(-)vendor/openssl/src/nid.rs (-4 / +4 lines)
Lines 1078-1090 Link Here
1078
    pub const SM2: Nid = Nid(ffi::NID_sm2);
1078
    pub const SM2: Nid = Nid(ffi::NID_sm2);
1079
    #[cfg(any(ossl111, libressl291))]
1079
    #[cfg(any(ossl111, libressl291))]
1080
    pub const SM3: Nid = Nid(ffi::NID_sm3);
1080
    pub const SM3: Nid = Nid(ffi::NID_sm3);
1081
    #[cfg(ossl111)]
1081
    #[cfg(any(ossl111, libressl380))]
1082
    pub const SHA3_224: Nid = Nid(ffi::NID_sha3_224);
1082
    pub const SHA3_224: Nid = Nid(ffi::NID_sha3_224);
1083
    #[cfg(ossl111)]
1083
    #[cfg(any(ossl111, libressl380))]
1084
    pub const SHA3_256: Nid = Nid(ffi::NID_sha3_256);
1084
    pub const SHA3_256: Nid = Nid(ffi::NID_sha3_256);
1085
    #[cfg(ossl111)]
1085
    #[cfg(any(ossl111, libressl380))]
1086
    pub const SHA3_384: Nid = Nid(ffi::NID_sha3_384);
1086
    pub const SHA3_384: Nid = Nid(ffi::NID_sha3_384);
1087
    #[cfg(ossl111)]
1087
    #[cfg(any(ossl111, libressl380))]
1088
    pub const SHA3_512: Nid = Nid(ffi::NID_sha3_512);
1088
    pub const SHA3_512: Nid = Nid(ffi::NID_sha3_512);
1089
    #[cfg(ossl111)]
1089
    #[cfg(ossl111)]
1090
    pub const SHAKE128: Nid = Nid(ffi::NID_shake128);
1090
    pub const SHAKE128: Nid = Nid(ffi::NID_shake128);
(-)vendor/openssl/src/x509/mod.rs (+1 lines)
Lines 1022-1027 Link Here
1022
    /// # Safety
1022
    /// # Safety
1023
    ///
1023
    ///
1024
    /// This method modifies global state without locking and therefore is not thread safe
1024
    /// This method modifies global state without locking and therefore is not thread safe
1025
    #[cfg(not(libressl390))]
1025
    #[corresponds(X509V3_EXT_add_alias)]
1026
    #[corresponds(X509V3_EXT_add_alias)]
1026
    #[deprecated(
1027
    #[deprecated(
1027
        note = "Use x509::extension types or new_from_der and then this is not necessary",
1028
        note = "Use x509::extension types or new_from_der and then this is not necessary",
(-)vendor/openssl-sys/build/cfgs.rs (+12 lines)
Lines 53-58 Link Here
53
        if libressl_version >= 0x3_07_00_00_0 {
53
        if libressl_version >= 0x3_07_00_00_0 {
54
            cfgs.push("libressl370");
54
            cfgs.push("libressl370");
55
        }
55
        }
56
        if libressl_version >= 0x3_08_00_00_0 {
57
            cfgs.push("libressl380");
58
        }
59
        if libressl_version >= 0x3_08_01_00_0 {
60
            cfgs.push("libressl381");
61
        }
62
        if libressl_version >= 0x3_08_02_00_0 {
63
            cfgs.push("libressl382");
64
        }
65
        if libressl_version >= 0x3_09_00_00_0 {
66
            cfgs.push("libressl390");
67
        }
56
    } else {
68
    } else {
57
        let openssl_version = openssl_version.unwrap();
69
        let openssl_version = openssl_version.unwrap();
58
70
(-)vendor/openssl-sys/build/main.rs (-2 / +4 lines)
Lines 273-278 Link Here
273
            (3, 7, 1) => ('3', '7', '1'),
273
            (3, 7, 1) => ('3', '7', '1'),
274
            (3, 7, _) => ('3', '7', 'x'),
274
            (3, 7, _) => ('3', '7', 'x'),
275
            (3, 8, 0) => ('3', '8', '0'),
275
            (3, 8, 0) => ('3', '8', '0'),
276
            (3, 8, 1) => ('3', '8', '1'),
277
            (3, 8, _) => ('3', '8', 'x'),
276
            _ => version_error(),
278
            _ => version_error(),
277
        };
279
        };
278
280
Lines 314-321 Link Here
314
    panic!(
316
    panic!(
315
        "
317
        "
316
318
317
This crate is only compatible with OpenSSL (version 1.0.1 through 1.1.1, or 3.0.0), or LibreSSL 2.5
319
This crate is only compatible with OpenSSL (version 1.0.1 through 1.1.1, or 3), or LibreSSL 2.5
318
through 3.8.0, but a different version of OpenSSL was found. The build is now aborting
320
through 3.8.1, but a different version of OpenSSL was found. The build is now aborting
319
due to this version mismatch.
321
due to this version mismatch.
320
322
321
"
323
"
(-)vendor/openssl-sys/src/crypto.rs (-1 / +1 lines)
Lines 106-112 Link Here
106
pub const CRYPTO_LOCK_SSL_SESSION: c_int = 14;
106
pub const CRYPTO_LOCK_SSL_SESSION: c_int = 14;
107
107
108
cfg_if! {
108
cfg_if! {
109
    if #[cfg(ossl110)] {
109
    if #[cfg(any(ossl110, libressl381))] {
110
        pub const CRYPTO_EX_INDEX_SSL: c_int = 0;
110
        pub const CRYPTO_EX_INDEX_SSL: c_int = 0;
111
        pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1;
111
        pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1;
112
    } else if #[cfg(libressl)] {
112
    } else if #[cfg(libressl)] {
(-)vendor/openssl-sys/src/handwritten/evp.rs (-4 / +4 lines)
Lines 294-306 Link Here
294
    pub fn EVP_sha256() -> *const EVP_MD;
294
    pub fn EVP_sha256() -> *const EVP_MD;
295
    pub fn EVP_sha384() -> *const EVP_MD;
295
    pub fn EVP_sha384() -> *const EVP_MD;
296
    pub fn EVP_sha512() -> *const EVP_MD;
296
    pub fn EVP_sha512() -> *const EVP_MD;
297
    #[cfg(ossl111)]
297
    #[cfg(any(ossl111, libressl380))]
298
    pub fn EVP_sha3_224() -> *const EVP_MD;
298
    pub fn EVP_sha3_224() -> *const EVP_MD;
299
    #[cfg(ossl111)]
299
    #[cfg(any(ossl111, libressl380))]
300
    pub fn EVP_sha3_256() -> *const EVP_MD;
300
    pub fn EVP_sha3_256() -> *const EVP_MD;
301
    #[cfg(ossl111)]
301
    #[cfg(any(ossl111, libressl380))]
302
    pub fn EVP_sha3_384() -> *const EVP_MD;
302
    pub fn EVP_sha3_384() -> *const EVP_MD;
303
    #[cfg(ossl111)]
303
    #[cfg(any(ossl111, libressl380))]
304
    pub fn EVP_sha3_512() -> *const EVP_MD;
304
    pub fn EVP_sha3_512() -> *const EVP_MD;
305
    #[cfg(ossl111)]
305
    #[cfg(ossl111)]
306
    pub fn EVP_shake128() -> *const EVP_MD;
306
    pub fn EVP_shake128() -> *const EVP_MD;
(-)vendor/openssl-sys/src/handwritten/types.rs (-1 / +1 lines)
Lines 329-335 Link Here
329
    }
329
    }
330
}
330
}
331
cfg_if! {
331
cfg_if! {
332
    if #[cfg(ossl110)] {
332
    if #[cfg(any(ossl110, libressl382))] {
333
        pub enum X509_ALGOR {}
333
        pub enum X509_ALGOR {}
334
    } else {
334
    } else {
335
        #[repr(C)]
335
        #[repr(C)]
(-)vendor/openssl-sys/src/handwritten/x509.rs (-3 / +1 lines)
Lines 700-709 Link Here
700
const_ptr_api! {
700
const_ptr_api! {
701
    extern "C" {
701
    extern "C" {
702
        pub fn X509_PURPOSE_get_by_sname(sname: #[const_ptr_if(any(ossl110, libressl280))] c_char) -> c_int;
702
        pub fn X509_PURPOSE_get_by_sname(sname: #[const_ptr_if(any(ossl110, libressl280))] c_char) -> c_int;
703
        pub fn X509_PURPOSE_get0(idx: c_int) -> #[const_ptr_if(libressl390)] X509_PURPOSE;
703
    }
704
    }
704
}
705
extern "C" {
706
    pub fn X509_PURPOSE_get0(idx: c_int) -> *mut X509_PURPOSE;
707
}
705
}
708
706
709
extern "C" {
707
extern "C" {
(-)vendor/openssl-sys/src/handwritten/x509v3.rs (+1 lines)
Lines 84-89 Link Here
84
}
84
}
85
85
86
extern "C" {
86
extern "C" {
87
    #[cfg(not(libressl390))]
87
    pub fn X509V3_EXT_add_alias(nid_to: c_int, nid_from: c_int) -> c_int;
88
    pub fn X509V3_EXT_add_alias(nid_to: c_int, nid_from: c_int) -> c_int;
88
    pub fn X509V3_EXT_d2i(ext: *mut X509_EXTENSION) -> *mut c_void;
89
    pub fn X509V3_EXT_d2i(ext: *mut X509_EXTENSION) -> *mut c_void;
89
    pub fn X509V3_EXT_i2d(ext_nid: c_int, crit: c_int, ext: *mut c_void) -> *mut X509_EXTENSION;
90
    pub fn X509V3_EXT_i2d(ext_nid: c_int, crit: c_int, ext: *mut c_void) -> *mut X509_EXTENSION;
(-)vendor/openssl-sys/src/obj_mac.rs (+8 lines)
Lines 974-985 Link Here
974
pub const NID_sm4_ctr: c_int = 979;
974
pub const NID_sm4_ctr: c_int = 979;
975
#[cfg(ossl111)]
975
#[cfg(ossl111)]
976
pub const NID_sha3_224: c_int = 1096;
976
pub const NID_sha3_224: c_int = 1096;
977
#[cfg(libressl380)]
978
pub const NID_sha3_224: c_int = 1031;
977
#[cfg(ossl111)]
979
#[cfg(ossl111)]
978
pub const NID_sha3_256: c_int = 1097;
980
pub const NID_sha3_256: c_int = 1097;
981
#[cfg(libressl380)]
982
pub const NID_sha3_256: c_int = 1032;
979
#[cfg(ossl111)]
983
#[cfg(ossl111)]
980
pub const NID_sha3_384: c_int = 1098;
984
pub const NID_sha3_384: c_int = 1098;
985
#[cfg(libressl380)]
986
pub const NID_sha3_384: c_int = 1033;
981
#[cfg(ossl111)]
987
#[cfg(ossl111)]
982
pub const NID_sha3_512: c_int = 1099;
988
pub const NID_sha3_512: c_int = 1099;
989
#[cfg(libressl380)]
990
pub const NID_sha3_512: c_int = 1034;
983
#[cfg(ossl111)]
991
#[cfg(ossl111)]
984
pub const NID_shake128: c_int = 1100;
992
pub const NID_shake128: c_int = 1100;
985
#[cfg(ossl111)]
993
#[cfg(ossl111)]

Return to bug 266670