diff options
| author | Benjamin Saunders <[email protected]> | 2018-05-17 15:17:40 -0700 |
|---|---|---|
| committer | Benjamin Saunders <[email protected]> | 2018-05-22 20:25:28 -0700 |
| commit | 2e478fdcf47bcb69a098bd6c3ab6227b53d45a24 (patch) | |
| tree | db1760d52af7cb9ccba248ecd6d540a8fa5215e4 /openssl-sys | |
| parent | Expose early keying material export (diff) | |
| download | rust-openssl-2e478fdcf47bcb69a098bd6c3ab6227b53d45a24.tar.xz rust-openssl-2e478fdcf47bcb69a098bd6c3ab6227b53d45a24.zip | |
Expose early I/O
Diffstat (limited to 'openssl-sys')
| -rw-r--r-- | openssl-sys/src/lib.rs | 3 | ||||
| -rw-r--r-- | openssl-sys/src/openssl/v111.rs | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 61e087d0..a48f6a85 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -2832,4 +2832,7 @@ extern "C" { pub fn EVP_MD_size(md: *const EVP_MD) -> c_int; pub fn EVP_get_cipherbyname(name: *const c_char) -> *const EVP_CIPHER; + + pub fn SSL_set_connect_state(s: *mut SSL); + pub fn SSL_set_accept_state(s: *mut SSL); } diff --git a/openssl-sys/src/openssl/v111.rs b/openssl-sys/src/openssl/v111.rs index 4a3f9560..36682663 100644 --- a/openssl-sys/src/openssl/v111.rs +++ b/openssl-sys/src/openssl/v111.rs @@ -55,6 +55,9 @@ pub const SSL_EXT_TLS1_3_CERTIFICATE: c_uint = 0x1000; pub const SSL_EXT_TLS1_3_NEW_SESSION_TICKET: c_uint = 0x2000; pub const SSL_EXT_TLS1_3_CERTIFICATE_REQUEST: c_uint = 0x4000; +pub const SSL_READ_EARLY_DATA_ERROR: c_int = 0; +pub const SSL_READ_EARLY_DATA_SUCCESS: c_int = 1; +pub const SSL_READ_EARLY_DATA_FINISH: c_int = 2; extern "C" { pub fn SSL_CTX_set_keylog_callback(ctx: *mut ::SSL_CTX, cb: SSL_CTX_keylog_cb_func); @@ -99,4 +102,7 @@ extern "C" { context: *const c_uchar, contextlen: size_t, ) -> c_int; + + pub fn SSL_write_early_data(s: *mut ::SSL, buf: *const c_void, num: size_t, written: *mut size_t) -> c_int; + pub fn SSL_read_early_data(s: *mut ::SSL, buf: *mut c_void, num: size_t, readbytes: *mut size_t) -> c_int; } |