forked from wolfSSL/wolfssl
Comment fixups, bad braces, and stray &.
This commit is contained in:
@@ -1524,16 +1524,15 @@ static int uartIORx(WOLFSSL *ssl, char *buf, int sz, void *ctx)
|
|||||||
msg_length = 0;
|
msg_length = 0;
|
||||||
XMEMSET(tb, 0, sizeof(*tb));
|
XMEMSET(tb, 0, sizeof(*tb));
|
||||||
|
|
||||||
/* Now get the bytes sent */
|
/* Now setup the DMA RX. */
|
||||||
status = HAL_UARTEx_ReceiveToIdle_DMA(&TLS_UART, (uint8_t *)tb->buf, MAX_RECORD_SIZE);
|
status = HAL_UARTEx_ReceiveToIdle_DMA(&TLS_UART, (uint8_t *)tb->buf, MAX_RECORD_SIZE);
|
||||||
|
|
||||||
if (status != HAL_OK) {
|
if (status != HAL_OK) {
|
||||||
return WOLFSSL_CBIO_ERR_WANT_READ;
|
return WOLFSSL_CBIO_ERR_WANT_READ;
|
||||||
} else {
|
} else {
|
||||||
/* We now go into an infinite loop waiting for msg_length to be set to a
|
/* We now go into an infinite loop waiting for msg_length to be set to a
|
||||||
* value other than 0. This will be done when the other side writes to
|
* value other than 0. This will be done when the other side writes to
|
||||||
* UART and then idles. That will trigger HAL_UARTEx_RxEventCallback()
|
* UART and then idles. That will trigger HAL_UARTEx_RxEventCallback()
|
||||||
* which will seetee msg_length to the length of data written.
|
* which will set msg_length to the length of data written.
|
||||||
*
|
*
|
||||||
* If you mistakenly get stuck here, please simply reset the board.
|
* If you mistakenly get stuck here, please simply reset the board.
|
||||||
*/
|
*/
|
||||||
@@ -1671,7 +1670,7 @@ done:
|
|||||||
#ifdef WOLFSSL_SMALL_STACK
|
#ifdef WOLFSSL_SMALL_STACK
|
||||||
if (tbuf != NULL) {
|
if (tbuf != NULL) {
|
||||||
XFREE(tbuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
XFREE(tbuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
{
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -1718,7 +1717,7 @@ static int tls13_uart_client(void)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
wolfSSL_SetIOReadCtx(ssl, &tbuf);
|
wolfSSL_SetIOReadCtx(ssl, tbuf);
|
||||||
|
|
||||||
#ifdef HAVE_PQC
|
#ifdef HAVE_PQC
|
||||||
if (wolfSSL_UseKeyShare(ssl, WOLFSSL_KYBER_LEVEL1) != WOLFSSL_SUCCESS) {
|
if (wolfSSL_UseKeyShare(ssl, WOLFSSL_KYBER_LEVEL1) != WOLFSSL_SUCCESS) {
|
||||||
@@ -1763,13 +1762,13 @@ done:
|
|||||||
#ifdef WOLFSSL_SMALL_STACK
|
#ifdef WOLFSSL_SMALL_STACK
|
||||||
if (tbuf != NULL) {
|
if (tbuf != NULL) {
|
||||||
XFREE(tbuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
XFREE(tbuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
{
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif /* !WOLFCRYPT_ONLY && WOLFSSL_TLS13 && !NO_TLS_UART_TEST */
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Public functions
|
* Public functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
Reference in New Issue
Block a user