From 9fff57839facb46e40b7eb8332e1091a68171842 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Thu, 4 Dec 2014 11:21:19 -0800 Subject: [PATCH] fixed saving ServerKeyExchange message in DTLS for most key exchange types --- src/internal.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/internal.c b/src/internal.c index 0216d4e2f..e51b71e2e 100644 --- a/src/internal.c +++ b/src/internal.c @@ -11460,6 +11460,12 @@ int DoSessionTicket(CYASSL* ssl, idx += HINT_LEN_SZ; XMEMCPY(output + idx, ssl->arrays->server_hint,length -HINT_LEN_SZ); + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + #endif + ret = HashOutput(ssl, output, sendSz, 0); if (ret != 0) return ret; @@ -11581,6 +11587,12 @@ int DoSessionTicket(CYASSL* ssl, idx += ssl->buffers.serverDH_Pub.length; (void)idx; /* suppress analyzer warning, and keep idx current */ + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + return ret; + #endif + ret = HashOutput(ssl, output, sendSz, 0); if (ret != 0) @@ -12033,6 +12045,12 @@ int DoSessionTicket(CYASSL* ssl, AddHeaders(output, length, server_key_exchange, ssl); + #ifdef CYASSL_DTLS + if (ssl->options.dtls) + if ((ret = DtlsPoolSave(ssl, output, sendSz)) != 0) + goto done_a; + #endif + if ((ret = HashOutput(ssl, output, sendSz, 0)) != 0) goto done_a;