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 |
} |