View | Details | Raw Unified | Return to bug 238536
Collapse All | Expand All

(-)b/net-im/fractal/files/patch-vendor_openssl-sys_build_cfgs.rs (+22 lines)
Added Link Here
1
--- vendor/openssl-sys/build/cfgs.rs.orig	2018-12-22 10:43:42 UTC
2
+++ vendor/openssl-sys/build/cfgs.rs
3
@@ -13,6 +13,9 @@ pub fn get(openssl_version: Option<u64>, libressl_vers
4
         if libressl_version >= 0x2_07_00_00_0 {
5
             cfgs.push("libressl270");
6
         }
7
+        if libressl_version >= 0x2_07_01_00_0 {
8
+            cfgs.push("libressl271");
9
+        }
10
         if libressl_version >= 0x2_07_03_00_0 {
11
             cfgs.push("libressl273");
12
         }
13
@@ -21,6 +24,9 @@ pub fn get(openssl_version: Option<u64>, libressl_vers
14
         }
15
         if libressl_version >= 0x2_08_01_00_0 {
16
             cfgs.push("libressl281");
17
+        }
18
+        if libressl_version >= 0x2_09_01_00_0 {
19
+            cfgs.push("libressl291");
20
         }
21
     } else {
22
         let openssl_version = openssl_version.unwrap();
(-)b/net-im/fractal/files/patch-vendor_openssl-sys_build_main.rs (+19 lines)
Added Link Here
1
--- vendor/openssl-sys/build/main.rs.orig	2018-12-22 10:43:42 UTC
2
+++ vendor/openssl-sys/build/main.rs
3
@@ -505,6 +505,7 @@ See rust-openssl README for more information:
4
             (8, 1) => ('8', '1'),
5
             (8, _) => ('8', 'x'),
6
             (9, 0) => ('9', '0'),
7
+            (9, _) => ('9', 'x'),
8
             _ => version_error(),
9
         };
10
 
11
@@ -545,7 +546,7 @@ fn version_error() -> ! {
12
         "
13
 
14
 This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
15
-through 2.9.0, but a different version of OpenSSL was found. The build is now aborting
16
+through 2.9.x, but a different version of OpenSSL was found. The build is now aborting
17
 due to this version mismatch.
18
 
19
 "
(-)b/net-im/fractal/files/patch-vendor_openssl-sys_src_crypto.rs (+26 lines)
Added Link Here
1
--- vendor/openssl-sys/src/crypto.rs.orig	2018-12-22 10:43:42 UTC
2
+++ vendor/openssl-sys/src/crypto.rs
3
@@ -15,7 +15,13 @@ cfg_if! {
4
     if #[cfg(ossl110)] {
5
         pub const CRYPTO_EX_INDEX_SSL: c_int = 0;
6
         pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1;
7
-
8
+    } else if #[cfg(libressl)] {
9
+        pub const CRYPTO_EX_INDEX_SSL: c_int = 1;
10
+        pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 2;
11
+    }
12
+}
13
+cfg_if! {
14
+    if #[cfg(any(ossl110, libressl271))] {
15
         extern "C" {
16
             pub fn OpenSSL_version_num() -> c_ulong;
17
             pub fn OpenSSL_version(key: c_int) -> *const c_char;
18
@@ -64,7 +70,7 @@ pub type CRYPTO_EX_free = unsafe extern "C" fn(
19
     argp: *mut c_void,
20
 );
21
 extern "C" {
22
-    #[cfg(ossl110)]
23
+    #[cfg(any(ossl110, libressl))]
24
     pub fn CRYPTO_get_ex_new_index(
25
         class_index: c_int,
26
         argl: c_long,
(-)b/net-im/fractal/files/patch-vendor_openssl-sys_src_ssl.rs (+11 lines)
Added Link Here
1
--- vendor/openssl-sys/src/ssl.rs.orig	2018-12-22 10:43:42 UTC
2
+++ vendor/openssl-sys/src/ssl.rs
3
@@ -1032,7 +1032,7 @@ extern "C" {
4
 }
5
 
6
 cfg_if! {
7
-    if #[cfg(ossl110)] {
8
+    if #[cfg(any(ossl110, libressl291))] {
9
         extern "C" {
10
             pub fn TLS_method() -> *const SSL_METHOD;
11
 
(-)b/net-im/fractal/files/patch-vendor_openssl_build.rs (+23 lines)
Added Link Here
1
--- vendor/openssl/build.rs.orig	2018-12-22 10:43:42 UTC
2
+++ vendor/openssl/build.rs
3
@@ -46,12 +46,20 @@ fn main() {
4
             println!("cargo:rustc-cfg=libressl270");
5
         }
6
 
7
+        if version >= 0x2_07_01_00_0 {
8
+            println!("cargo:rustc-cfg=libressl271");
9
+        }
10
+
11
         if version >= 0x2_07_03_00_0 {
12
             println!("cargo:rustc-cfg=libressl273");
13
         }
14
 
15
         if version >= 0x2_08_00_00_0 {
16
             println!("cargo:rustc-cfg=libressl280");
17
+        }
18
+
19
+        if version >= 0x2_09_01_00_0 {
20
+            println!("cargo:rustc-cfg=libressl291");
21
         }
22
     }
23
 }
(-)b/net-im/fractal/files/patch-vendor_openssl_src_ssl_mod.rs (+28 lines)
Added Link Here
1
--- vendor/openssl/src/ssl/mod.rs.orig	2018-12-22 10:43:42 UTC
2
+++ vendor/openssl/src/ssl/mod.rs
3
@@ -3690,9 +3690,14 @@ cfg_if! {
4
 }
5
 
6
 cfg_if! {
7
-    if #[cfg(ossl110)] {
8
+    if #[cfg(any(ossl110, libressl291))] {
9
         use ffi::{TLS_method, DTLS_method};
10
-
11
+    } else {
12
+        use ffi::{SSLv23_method as TLS_method, DTLSv1_method as DTLS_method};
13
+    }
14
+}
15
+cfg_if! {
16
+    if #[cfg(ossl110)] {
17
         unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int {
18
             ffi::CRYPTO_get_ex_new_index(
19
                 ffi::CRYPTO_EX_INDEX_SSL_CTX,
20
@@ -3715,8 +3720,6 @@ cfg_if! {
21
             )
22
         }
23
     } else {
24
-        use ffi::{SSLv23_method as TLS_method, DTLSv1_method as DTLS_method};
25
-
26
         unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int {
27
             ffi::SSL_CTX_get_ex_new_index(0, ptr::null_mut(), None, None, Some(f))
28
         }
(-)b/net-im/fractal/files/patch-vendor_openssl_src_version.rs (+11 lines)
Added Link Here
1
--- vendor/openssl/src/version.rs.orig	2018-12-22 10:43:42 UTC
2
+++ vendor/openssl/src/version.rs
3
@@ -14,7 +14,7 @@
4
 use std::ffi::CStr;
5
 
6
 cfg_if! {
7
-    if #[cfg(ossl110)] {
8
+    if #[cfg(any(ossl110, libressl271))] {
9
         use ffi::{
10
             OPENSSL_VERSION, OPENSSL_CFLAGS, OPENSSL_BUILT_ON, OPENSSL_PLATFORM, OPENSSL_DIR,
11
             OpenSSL_version_num, OpenSSL_version,

Return to bug 238536