mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Only do early data in initial handshake when using PSK
This commit is contained in:
@ -2290,14 +2290,8 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
}
|
||||
else {
|
||||
#ifdef WOLFSSL_EARLY_DATA
|
||||
#ifndef HAVE_SESSION_TICKET
|
||||
if (!usePsk) {
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (earlyData) {
|
||||
if (usePsk && earlyData)
|
||||
EarlyData(ctx, ssl, msg, msgSz, buffer);
|
||||
}
|
||||
#endif
|
||||
do {
|
||||
err = 0; /* reset error */
|
||||
|
@ -8453,8 +8453,7 @@ int wolfSSL_write_early_data(WOLFSSL* ssl, const void* data, int sz, int* outSz)
|
||||
if (ret != WOLFSSL_SUCCESS)
|
||||
return WOLFSSL_FATAL_ERROR;
|
||||
}
|
||||
if (ssl->options.handShakeState == CLIENT_HELLO_COMPLETE ||
|
||||
ssl->options.handShakeState == HANDSHAKE_DONE) {
|
||||
if (ssl->options.handShakeState == CLIENT_HELLO_COMPLETE) {
|
||||
ret = SendData(ssl, data, sz);
|
||||
if (ret > 0)
|
||||
*outSz = ret;
|
||||
|
Reference in New Issue
Block a user