mirror of
https://github.com/qemu/qemu.git
synced 2026-05-17 15:39:58 +00:00
io: tls: Add qio_channel_tls_bye
Add a task dispatcher for gnutls_bye similar to the qio_channel_tls_handshake_task(). The gnutls_bye() call might be interrupted and so it needs to be rescheduled. The migration code will make use of this to help the migration destination identify a premature EOF. Once the session termination is in place, any EOF that happens before the source issued gnutls_bye() will be considered an error. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Acked-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
@@ -49,8 +49,20 @@ struct QIOChannelTLS {
|
||||
QCryptoTLSSession *session;
|
||||
QIOChannelShutdown shutdown;
|
||||
guint hs_ioc_tag;
|
||||
guint bye_ioc_tag;
|
||||
};
|
||||
|
||||
/**
|
||||
* qio_channel_tls_bye:
|
||||
* @ioc: the TLS channel object
|
||||
* @errp: pointer to a NULL-initialized error object
|
||||
*
|
||||
* Perform the TLS session termination. This method will return
|
||||
* immediately and the termination will continue in the background,
|
||||
* provided the main loop is running.
|
||||
*/
|
||||
void qio_channel_tls_bye(QIOChannelTLS *ioc, Error **errp);
|
||||
|
||||
/**
|
||||
* qio_channel_tls_new_server:
|
||||
* @master: the underlying channel object
|
||||
|
||||
Reference in New Issue
Block a user