mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
crypto: TLS: introduce check_pending
The new `qcrypto_tls_session_check_pending` function allows the caller to know if data have already been consumed from the backend and is already available. Signed-off-by: Antoine Damhet <antoine.damhet@shadow.tech> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
6a50f64ca0
commit
33ee0d8e2f
2 changed files with 25 additions and 0 deletions
|
@ -248,6 +248,17 @@ ssize_t qcrypto_tls_session_read(QCryptoTLSSession *sess,
|
|||
char *buf,
|
||||
size_t len);
|
||||
|
||||
/**
|
||||
* qcrypto_tls_session_check_pending:
|
||||
* @sess: the TLS session object
|
||||
*
|
||||
* Check if there are unread data in the TLS buffers that have
|
||||
* already been read from the underlying data source.
|
||||
*
|
||||
* Returns: the number of bytes available or zero
|
||||
*/
|
||||
size_t qcrypto_tls_session_check_pending(QCryptoTLSSession *sess);
|
||||
|
||||
/**
|
||||
* qcrypto_tls_session_handshake:
|
||||
* @sess: the TLS session object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue