diff options
| author | Steven Fackler <[email protected]> | 2015-04-08 23:52:09 -0400 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-04-08 23:52:09 -0400 |
| commit | 11059e1b2dd4077fa2fd433f9d7d04da1cf175c6 (patch) | |
| tree | ca92efe9faf168a5393b32205d6c22cf8aad84d1 /openssl-sys/src/lib.rs | |
| parent | Release v0.6.0 (diff) | |
| parent | Use latest openssl library (v1.0.2) (diff) | |
| download | rust-openssl-11059e1b2dd4077fa2fd433f9d7d04da1cf175c6.tar.xz rust-openssl-11059e1b2dd4077fa2fd433f9d7d04da1cf175c6.zip | |
Merge pull request #179 from manuels/dtls
DTLS support
Diffstat (limited to 'openssl-sys/src/lib.rs')
| -rw-r--r-- | openssl-sys/src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index a4accc29..109c4168 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -134,6 +134,7 @@ pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77; pub const SSL_CTRL_SET_TLSEXT_HOSTNAME: c_int = 55; pub const SSL_CTRL_EXTRA_CHAIN_CERT: c_int = 14; +pub const SSL_CTRL_SET_READ_AHEAD: c_int = 41; pub const SSL_ERROR_NONE: c_int = 0; pub const SSL_ERROR_SSL: c_int = 1; pub const SSL_ERROR_SYSCALL: c_int = 5; @@ -282,6 +283,9 @@ pub unsafe fn SSL_CTX_add_extra_chain_cert(ssl: *mut SSL_CTX, cert: *mut X509) - SSL_CTX_ctrl(ssl, SSL_CTRL_EXTRA_CHAIN_CERT, 0, cert) } +pub unsafe fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, m: c_long) -> c_long { + SSL_CTX_ctrl(ctx, SSL_CTRL_SET_READ_AHEAD, m, ptr::null_mut()) +} // True functions extern "C" { @@ -482,6 +486,10 @@ extern "C" { pub fn TLSv1_1_method() -> *const SSL_METHOD; #[cfg(feature = "tlsv1_2")] pub fn TLSv1_2_method() -> *const SSL_METHOD; + #[cfg(feature = "dtlsv1")] + pub fn DTLSv1_method() -> *const SSL_METHOD; + #[cfg(feature = "dtlsv1_2")] + pub fn DTLSv1_2_method() -> *const SSL_METHOD; pub fn SSLv23_method() -> *const SSL_METHOD; pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; |