rust: bssl-tls: Unstage wants_data This function has been accidentally added from a list of deprecated functions. Update-Note: If you happen to depend on this function, please use the return value of do_handshake, sync_read, sync_write and peek instead. Signed-off-by: Xiangfei Ding <xfding@google.com> Change-Id: I43bd4f5a5ff4b2ddf166a28aca33b1b16a6a6964 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/101667 Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/rust/bssl-tls/src/connection/lifecycle.rs b/rust/bssl-tls/src/connection/lifecycle.rs index 6043267..aff6943 100644 --- a/rust/bssl-tls/src/connection/lifecycle.rs +++ b/rust/bssl-tls/src/connection/lifecycle.rs
@@ -102,32 +102,6 @@ } } -bssl_macros::bssl_enum! { - /// TLS data-pending reasons - pub enum TlsPendingData: i32 { - /// TLS connection wants to read more data. - WantRead = bssl_sys::SSL_READING as i32, - /// TLS connection wants to write more data. - WantWrite = bssl_sys::SSL_WRITING as i32, - } -} - -/// # Connection state -/// -/// When operations on [`TlsConnection`] return with pending status, -/// there will be reasons why the operations should be retried. -impl<R, M> TlsConnection<R, M> { - /// Check the connection if it needs additional data. - pub fn wants_data(&self) -> Option<TlsPendingData> { - let code = unsafe { - // Safety: the validity of the handle is witnessed by `self`. - bssl_sys::SSL_want(self.ptr()) - }; - let code = i32::try_from(code).ok()?; - TlsPendingData::try_from(code).ok() - } -} - /// # Alerts impl<R, M> TlsConnection<R, M> where