qio: non-default context for TLS handshake

A new parameter "context" is added to qio_channel_tls_handshake() is to
allow the TLS to be run on a non-default context.  Still, no functional
change.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Peter Xu 2018-03-05 14:43:24 +08:00 committed by Daniel P. Berrangé
parent 8005fdd8fa
commit 1939ccdaa6
9 changed files with 47 additions and 12 deletions

View file

@ -116,6 +116,8 @@ qio_channel_tls_new_client(QIOChannel *master,
* @func: the callback to invoke when completed
* @opaque: opaque data to pass to @func
* @destroy: optional callback to free @opaque
* @context: the context that TLS handshake will run with. If %NULL,
* the default context will be used
*
* Perform the TLS session handshake. This method
* will return immediately and the handshake will
@ -126,7 +128,8 @@ qio_channel_tls_new_client(QIOChannel *master,
void qio_channel_tls_handshake(QIOChannelTLS *ioc,
QIOTaskFunc func,
gpointer opaque,
GDestroyNotify destroy);
GDestroyNotify destroy,
GMainContext *context);
/**
* qio_channel_tls_get_session: