Expose FFI bindings needed for SSL_stateless
This commit is contained in:
parent
cebfbd9a25
commit
e06a209e72
|
|
@ -18,6 +18,11 @@ mod ossl110;
|
||||||
#[cfg(ossl110)]
|
#[cfg(ossl110)]
|
||||||
pub use ossl110::*;
|
pub use ossl110::*;
|
||||||
|
|
||||||
|
#[cfg(ossl111)]
|
||||||
|
mod ossl111;
|
||||||
|
#[cfg(ossl111)]
|
||||||
|
pub use ossl111::*;
|
||||||
|
|
||||||
#[cfg(libressl)]
|
#[cfg(libressl)]
|
||||||
mod libressl;
|
mod libressl;
|
||||||
#[cfg(libressl)]
|
#[cfg(libressl)]
|
||||||
|
|
@ -1430,6 +1435,8 @@ pub const GEN_URI: c_int = 6;
|
||||||
pub const GEN_IPADD: c_int = 7;
|
pub const GEN_IPADD: c_int = 7;
|
||||||
pub const GEN_RID: c_int = 8;
|
pub const GEN_RID: c_int = 8;
|
||||||
|
|
||||||
|
pub const DTLS1_COOKIE_LENGTH: c_uint = 256;
|
||||||
|
|
||||||
// macros
|
// macros
|
||||||
pub unsafe fn BIO_get_mem_data(b: *mut BIO, pp: *mut *mut c_char) -> c_long {
|
pub unsafe fn BIO_get_mem_data(b: *mut BIO, pp: *mut *mut c_char) -> c_long {
|
||||||
BIO_ctrl(b, BIO_CTRL_INFO, 0, pp as *mut c_void)
|
BIO_ctrl(b, BIO_CTRL_INFO, 0, pp as *mut c_void)
|
||||||
|
|
@ -2762,4 +2769,33 @@ extern "C" {
|
||||||
pub fn FIPS_mode_set(onoff: c_int) -> c_int;
|
pub fn FIPS_mode_set(onoff: c_int) -> c_int;
|
||||||
#[cfg(not(libressl))]
|
#[cfg(not(libressl))]
|
||||||
pub fn FIPS_mode() -> c_int;
|
pub fn FIPS_mode() -> c_int;
|
||||||
|
|
||||||
|
pub fn SSL_CTX_set_cookie_generate_cb(
|
||||||
|
s: *mut SSL_CTX,
|
||||||
|
cb: Option<extern "C" fn(
|
||||||
|
ssl: *mut SSL,
|
||||||
|
cookie: *mut c_uchar,
|
||||||
|
cookie_len: *mut c_uint
|
||||||
|
) -> c_int>
|
||||||
|
);
|
||||||
|
|
||||||
|
#[cfg(ossl110)]
|
||||||
|
pub fn SSL_CTX_set_cookie_verify_cb(
|
||||||
|
s: *mut SSL_CTX,
|
||||||
|
cb: Option<extern "C" fn(
|
||||||
|
ssl: *mut SSL,
|
||||||
|
cookie: *const c_uchar,
|
||||||
|
cookie_len: c_uint
|
||||||
|
) -> c_int>
|
||||||
|
);
|
||||||
|
|
||||||
|
#[cfg(not(ossl110))]
|
||||||
|
pub fn SSL_CTX_set_cookie_verify_cb(
|
||||||
|
s: *mut SSL_CTX,
|
||||||
|
cb: Option<extern "C" fn(
|
||||||
|
ssl: *mut SSL,
|
||||||
|
cookie: *mut c_uchar,
|
||||||
|
cookie_len: c_uint
|
||||||
|
) -> c_int>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
use libc::{c_int, c_ulong};
|
||||||
|
|
||||||
|
use ossl110::*;
|
||||||
|
|
||||||
|
pub const SSL_COOKIE_LENGTH: c_int = 255;
|
||||||
|
|
||||||
|
pub const SSL_OP_ENABLE_MIDDLEBOX_COMPAT: c_ulong = 0x00100000;
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
pub fn SSL_stateless(s: *mut SSL) -> c_int;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue