mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Fix for Async TLS v1.3 wolfSSL_write with AES GCM offload. The args->idx
was being incremented on the repeated call with BUILD_MSG_HASH
state.
This commit is contained in:
@ -2127,15 +2127,15 @@ int BuildTls13Message(WOLFSSL* ssl, byte* output, int outSz, const byte* input,
|
||||
goto exit_buildmsg;
|
||||
}
|
||||
|
||||
/* The real record content type goes at the end of the data. */
|
||||
output[args->idx++] = (byte)type;
|
||||
|
||||
ssl->options.buildMsgState = BUILD_MSG_ENCRYPT;
|
||||
}
|
||||
FALL_THROUGH;
|
||||
|
||||
case BUILD_MSG_ENCRYPT:
|
||||
{
|
||||
/* The real record content type goes at the end of the data. */
|
||||
output[args->idx++] = (byte)type;
|
||||
|
||||
#ifdef ATOMIC_USER
|
||||
if (ssl->ctx->MacEncryptCb) {
|
||||
/* User Record Layer Callback handling */
|
||||
@ -2183,6 +2183,9 @@ exit_buildmsg:
|
||||
|
||||
/* Final cleanup */
|
||||
FreeBuildMsg13Args(ssl, args);
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
ssl->async.freeArgs = NULL;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user