fixed saving ServerKeyExchange message in DTLS for most key exchange types

This commit is contained in:
John Safranek
2014-12-04 11:21:19 -08:00
parent a9d9ff8b58
commit 9fff57839f

View File

@ -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;