Make grouping EarlyData and ClientHello a configuration option

This commit is contained in:
Sean Parkinson
2018-09-03 08:48:28 +10:00
parent d089a4651a
commit 4b208f4fe5
3 changed files with 13 additions and 1 deletions

View File

@ -2794,6 +2794,13 @@ AC_ARG_ENABLE([earlydata],
[ ENABLED_TLS13_EARLY_DATA=$enableval ],
[ ENABLED_TLS13_EARLY_DATA=no ]
)
if test "$ENABLED_TLS13_EARLY_DATA" = "group"
then
ENABLED_TLS13_EARLY_DATA="yes"
# Group EarlyData with ClientHello
AM_CFLAGS="-DWOLFSSL_EARLY_DATA_GROUP $AM_CFLAGS"
fi
if test "$ENABLED_TLS13_EARLY_DATA" = "yes"
then
if test "x$ENABLED_TLS13" = "xno"
@ -2812,6 +2819,7 @@ then
AM_CFLAGS="$AM_CFLAGS -DNO_SESSION_CACHE"
fi
# PKCS7
AC_ARG_ENABLE([pkcs7],
[AS_HELP_STRING([--enable-pkcs7],[Enable PKCS7 (default: disabled)])],

View File

@ -14764,7 +14764,9 @@ int SendData(WOLFSSL* ssl, const void* data, int sz)
WOLFSSL_MSG("handshake complete, trying to send early data");
return BUILD_MSG_ERROR;
}
#ifdef WOLFSSL_EARLY_DATA_GROUP
groupMsgs = 1;
#endif
}
else
#endif

View File

@ -42,6 +42,8 @@
* and key generation input and output.
* WOLFSSL_EARLY_DATA
* Allow 0-RTT Handshake using Early Data extensions and handshake message
* WOLFSSL_EARLY_DATA_GROUP
* Group EarlyData message with ClientHello when sending
* WOLFSSL_NO_SERVER_GROUPS_EXT
* Do not send the server's groups in an extension when the server's top
* preference is not in client's list.
@ -2670,7 +2672,7 @@ int SendTls13ClientHello(WOLFSSL* ssl)
ssl->buffers.outputBuffer.length += sendSz;
#ifdef WOLFSSL_EARLY_DATA
#ifdef WOLFSSL_EARLY_DATA_GROUP
if (ssl->earlyData == no_early_data)
#endif
ret = SendBuffered(ssl);