aboutsummaryrefslogtreecommitdiff
path: root/openssl
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2018-09-13 14:37:21 -0700
committerGitHub <[email protected]>2018-09-13 14:37:21 -0700
commitb09929fd07808d1dbcc8b9fbdba0d0957f6360d3 (patch)
treebce9f2edb0e22d80c8540fd9654ef0f3bc995419 /openssl
parentMerge pull request #990 from sfackler/one-sys-mod (diff)
parentFix missing symbol (diff)
downloadrust-openssl-b09929fd07808d1dbcc8b9fbdba0d0957f6360d3.tar.xz
rust-openssl-b09929fd07808d1dbcc8b9fbdba0d0957f6360d3.zip
Merge pull request #991 from sfackler/libressl-28
Support libressl 2.8.0
Diffstat (limited to 'openssl')
-rw-r--r--openssl/build.rs4
-rw-r--r--openssl/src/ssl/callbacks.rs23
2 files changed, 18 insertions, 9 deletions
diff --git a/openssl/build.rs b/openssl/build.rs
index f1166d62..99731c57 100644
--- a/openssl/build.rs
+++ b/openssl/build.rs
@@ -49,5 +49,9 @@ fn main() {
if version >= 0x2_07_03_00_0 {
println!("cargo:rustc-cfg=libressl273");
}
+
+ if version >= 0x2_08_00_00_0 {
+ println!("cargo:rustc-cfg=libressl280");
+ }
}
}
diff --git a/openssl/src/ssl/callbacks.rs b/openssl/src/ssl/callbacks.rs
index c9779416..daa58a4e 100644
--- a/openssl/src/ssl/callbacks.rs
+++ b/openssl/src/ssl/callbacks.rs
@@ -379,10 +379,13 @@ pub unsafe extern "C" fn raw_remove_session<F>(
callback(ctx, session)
}
-#[cfg(ossl110)]
-type DataPtr = *const c_uchar;
-#[cfg(not(ossl110))]
-type DataPtr = *mut c_uchar;
+cfg_if! {
+ if #[cfg(any(ossl110, libressl280))] {
+ type DataPtr = *const c_uchar;
+ } else {
+ type DataPtr = *mut c_uchar;
+ }
+}
pub unsafe extern "C" fn raw_get_session<F>(
ssl: *mut ffi::SSL,
@@ -503,11 +506,13 @@ where
}
}
-#[cfg(ossl110)]
-type CookiePtr = *const c_uchar;
-
-#[cfg(not(ossl110))]
-type CookiePtr = *mut c_uchar;
+cfg_if! {
+ if #[cfg(any(ossl110, libressl280))] {
+ type CookiePtr = *const c_uchar;
+ } else {
+ type CookiePtr = *mut c_uchar;
+ }
+}
pub extern "C" fn raw_cookie_verify<F>(
ssl: *mut ffi::SSL,