diff options
author | Antoine Damhet <antoine.damhet@shadow.tech> | 2022-11-15 15:23:28 +0100 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2023-02-15 11:01:03 -0500 |
commit | 33ee0d8e2fb5e7772a67c8785554ec9fc9477678 (patch) | |
tree | 7750cd30780d8cb0d2c2af92728bfbc38769b5d1 /crypto | |
parent | 6a50f64ca01d0a7b97f14f069762bfd88160f31e (diff) |
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>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/tlssession.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/tlssession.c b/crypto/tlssession.c index b302d835d2..1e98f44e0d 100644 --- a/crypto/tlssession.c +++ b/crypto/tlssession.c @@ -493,6 +493,13 @@ qcrypto_tls_session_read(QCryptoTLSSession *session, } +size_t +qcrypto_tls_session_check_pending(QCryptoTLSSession *session) +{ + return gnutls_record_check_pending(session->handle); +} + + int qcrypto_tls_session_handshake(QCryptoTLSSession *session, Error **errp) @@ -615,6 +622,13 @@ qcrypto_tls_session_read(QCryptoTLSSession *sess, } +size_t +qcrypto_tls_session_check_pending(QCryptoTLSSession *session) +{ + return 0; +} + + int qcrypto_tls_session_handshake(QCryptoTLSSession *sess, Error **errp) |