diff options
| author | Steven Fackler <[email protected]> | 2018-03-31 11:28:03 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-03-31 11:28:03 -0700 |
| commit | e423da2d124de888187355d6aada527b1eaeaaa5 (patch) | |
| tree | aa713d6937fdfd022efcefe52509384e75b58c5c /openssl-sys/src | |
| parent | Merge pull request #891 from sfackler/fix-vcpkg (diff) | |
| parent | Add test for stateless connection (diff) | |
| download | rust-openssl-e423da2d124de888187355d6aada527b1eaeaaa5.tar.xz rust-openssl-e423da2d124de888187355d6aada527b1eaeaaa5.zip | |
Merge pull request #858 from Ralith/stateless-api
Introduce SslStreamBuilder
Diffstat (limited to 'openssl-sys/src')
| -rw-r--r-- | openssl-sys/src/ossl111.rs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/openssl-sys/src/ossl111.rs b/openssl-sys/src/ossl111.rs index 23599d32..6d6f8d4f 100644 --- a/openssl-sys/src/ossl111.rs +++ b/openssl-sys/src/ossl111.rs @@ -25,7 +25,7 @@ pub type SSL_custom_ext_parse_cb_ex = chainidx: size_t, al: *mut c_int, parse_arg: *mut c_void) -> c_int>; -pub const SSL_COOKIE_LENGTH: c_int = 255; +pub const SSL_COOKIE_LENGTH: c_int = 4096; pub const SSL_OP_ENABLE_MIDDLEBOX_COMPAT: c_ulong = 0x00100000; @@ -65,4 +65,20 @@ extern "C" { parse_arg: *mut c_void) -> c_int; pub fn SSL_stateless(s: *mut ::SSL) -> c_int; pub fn SSL_CIPHER_get_handshake_digest(cipher: *const ::SSL_CIPHER) -> *const ::EVP_MD; + pub fn SSL_CTX_set_stateless_cookie_generate_cb( + s: *mut ::SSL_CTX, + cb: Option<unsafe extern "C" fn( + ssl: *mut ::SSL, + cookie: *mut c_uchar, + cookie_len: *mut size_t + ) -> c_int> + ); + pub fn SSL_CTX_set_stateless_cookie_verify_cb( + s: *mut ::SSL_CTX, + cb: Option<unsafe extern "C" fn( + ssl: *mut ::SSL, + cookie: *const c_uchar, + cookie_len: size_t + ) -> c_int> + ); } |