Lines Matching defs:data

287         /// Normally, a write in OpenSSL will always write out all of the requested data, even if it
292 /// Disables a check that the data buffer has not moved between calls when operating in a
776 // context's ex data. Instead, pass the pointer directly as the servername arg. It's
777 // still stored in ex data to manage the lifetime.
826 /// If enabled, OpenSSL will read as much data as is available from the underlying stream,
1557 /// Sets the extra data at the specified index.
1559 /// This can be used to provide data to callbacks registered with the context. Use the
1562 pub fn set_ex_data<T>(&mut self, index: Index<SslContext, T>, data: T) {
1563 self.set_ex_data_inner(index, data);
1566 fn set_ex_data_inner<T>(&mut self, index: Index<SslContext, T>, data: T) -> *mut c_void {
1568 let data = Box::into_raw(Box::new(data)) as *mut c_void;
1569 ffi::SSL_CTX_set_ex_data(self.as_ptr(), index.as_raw(), data);
1570 data
1628 /// Sets the maximum amount of early data that will be accepted on incoming connections.
1763 /// Returns a new extra data index.
1766 /// to store data in the context that can be retrieved later by callbacks, for example.
1839 /// Returns a reference to the extra data at the specified index.
1843 let data = ffi::SSL_CTX_get_ex_data(self.as_ptr(), index.as_raw());
1844 if data.is_null() {
1847 Some(&*(data as *const T))
1852 /// Gets the maximum amount of early data that will be accepted on incoming connections.
2143 /// Gets the maximum amount of early data that can be sent on this session.
2213 /// Returns a new extra data index.
2216 /// to store data in the context that can be retrieved later by callbacks, for example.
2606 let mut data: *const c_uchar = ptr::null();
2609 // `data` will point at a `c_uchar` array; `len` will contain the length of this array.
2610 ffi::SSL_get0_alpn_selected(self.as_ptr(), &mut data, &mut len);
2612 if data.is_null() {
2615 Some(slice::from_raw_parts(data, len as usize))
2925 /// Sets the extra data at the specified index.
2927 /// This can be used to provide data to callbacks registered with the context. Use the
2930 pub fn set_ex_data<T>(&mut self, index: Index<Ssl, T>, data: T) {
2932 let data = Box::new(data);
2936 Box::into_raw(data) as *mut c_void,
2941 /// Returns a reference to the extra data at the specified index.
2945 let data = ffi::SSL_get_ex_data(self.as_ptr(), index.as_raw());
2946 if data.is_null() {
2949 Some(&*(data as *const T))
2954 /// Returns a mutable reference to the extra data at the specified index.
2958 let data = ffi::SSL_get_ex_data(self.as_ptr(), index.as_raw());
2959 if data.is_null() {
2962 Some(&mut *(data as *mut T))
2967 /// Sets the maximum amount of early data that will be accepted on this connection.
2980 /// Gets the maximum amount of early data that can be sent on this connection.
3521 /// Read application data transmitted by a client before handshake completion.
3526 /// Returns `Ok(0)` if all early data has been read.
3549 /// Send data to the server without blocking on handshake completion.
3682 /// Reads data from the stream, without removing it from the queue.
3964 /// Read application data transmitted by a client before handshake
3970 /// Returns `Ok(0)` if all early data has been read.
3982 /// Send data to the server without blocking on handshake completion.