diff options
| author | Steven Fackler <[email protected]> | 2018-09-13 14:37:21 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-09-13 14:37:21 -0700 |
| commit | b09929fd07808d1dbcc8b9fbdba0d0957f6360d3 (patch) | |
| tree | bce9f2edb0e22d80c8540fd9654ef0f3bc995419 /openssl/src | |
| parent | Merge pull request #990 from sfackler/one-sys-mod (diff) | |
| parent | Fix missing symbol (diff) | |
| download | rust-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/src')
| -rw-r--r-- | openssl/src/ssl/callbacks.rs | 23 |
1 files changed, 14 insertions, 9 deletions
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, |