Commit b50dc27c authored by Steven Fackler's avatar Steven Fackler
Browse files

fix sslmode size

parent 8c3e29f7
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -429,7 +429,13 @@ pub unsafe fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, op: c_long) -> c_long {
pub const SSL_COOKIE_LENGTH: c_int = 4096;

cfg_if! {
    if #[cfg(ossl110)] {
    if #[cfg(ossl300)] {
        extern "C" {
            pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u64;
            pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, op: c_ulong) -> u64;
            pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, op: c_ulong) -> u64;
        }
    } else if #[cfg(ossl110)] {
        extern "C" {
            pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> c_ulong;
            pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, op: c_ulong) -> c_ulong;
+9 −1
Original line number Diff line number Diff line
@@ -254,9 +254,17 @@ bitflags! {
    }
}

cfg_if! {
    if #[cfg(ossl300)] {
        type SslModeRepr = u64;
    } else {
        type SslModeRepr = c_long;
    }
}

bitflags! {
    /// Options controlling the behavior of an `SslContext`.
    pub struct SslMode: c_long {
    pub struct SslMode: SslModeRepr {
        /// Enables "short writes".
        ///
        /// Normally, a write in OpenSSL will always write out all of the requested data, even if it