diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-07-02 10:11:41 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-07-12 11:56:58 +0200 |
commit | e1326209aa7160e1332cf571a8eb8c2ccfd7369d (patch) | |
tree | 51fd8ebb9da0861fd0420cdf9947a999eb65ad47 /lib/handshake.c | |
parent | 40b5e30494230f1e87d1622f14cf65cce5ba3bc9 (diff) | |
download | gnutls-e1326209aa7160e1332cf571a8eb8c2ccfd7369d.tar.gz |
gnutls_session_ticket_send: allow sending multiple tickets in one go
This allows combining the tickets in a single record message when
possible.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/handshake.c')
-rw-r--r-- | lib/handshake.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/handshake.c b/lib/handshake.c index dd2e02908c..5feaed99fd 100644 --- a/lib/handshake.c +++ b/lib/handshake.c @@ -1154,14 +1154,21 @@ int _gnutls_call_hook_func(gnutls_session_t session, (t == GNUTLS_HANDSHAKE_HELLO_REQUEST || t == GNUTLS_HANDSHAKE_KEY_UPDATE || \ (t == GNUTLS_HANDSHAKE_NEW_SESSION_TICKET && v->tls13_sem)) +int +_gnutls_send_handshake(gnutls_session_t session, mbuffer_st * bufel, + gnutls_handshake_description_t type) +{ + return _gnutls_send_handshake2(session, bufel, type, 0); +} + /* This function sends a handshake message of type 'type' containing the * data specified here. If the previous _gnutls_send_handshake() returned * GNUTLS_E_AGAIN or GNUTLS_E_INTERRUPTED, then it must be called again * (until it returns ok), with NULL parameters. */ int -_gnutls_send_handshake(gnutls_session_t session, mbuffer_st * bufel, - gnutls_handshake_description_t type) +_gnutls_send_handshake2(gnutls_session_t session, mbuffer_st * bufel, + gnutls_handshake_description_t type, unsigned queue_only) { int ret; uint8_t *data; @@ -1244,6 +1251,9 @@ _gnutls_send_handshake(gnutls_session_t session, mbuffer_st * bufel, return ret; } + if (queue_only) + return 0; + /* Decide when to cache and when to send */ if (vers && vers->tls13_sem) { |