diff options
author | Daiki Ueno <ueno@gnu.org> | 2020-11-29 17:44:24 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2020-11-29 17:44:24 +0100 |
commit | ec1c7425faf421096d679e9e951f55546d0a2d23 (patch) | |
tree | 1c6e31ca248fc44e1b895035ed5fdf68e241e396 /lib/record.c | |
parent | b4b9f8535ddb852b0331918a63062d730d280bcc (diff) | |
download | gnutls-ec1c7425faf421096d679e9e951f55546d0a2d23.tar.gz |
gnutls_handshake_write: don't enqueue empty Handshake message
Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'lib/record.c')
-rw-r--r-- | lib/record.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/record.c b/lib/record.c index 3a8f8e78cc..8b0d2bc60e 100644 --- a/lib/record.c +++ b/lib/record.c @@ -2370,6 +2370,10 @@ gnutls_handshake_write(gnutls_session_t session, if (IS_DTLS(session)) return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); + /* Nothing to do */ + if (data_size == 0) + return gnutls_assert_val(0); + /* When using this, the outgoing handshake messages should * also be handled manually */ if (!session->internals.h_read_func) |