ssl_client2: Improve loop writing early data
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
b4fd47e897
commit
0aead12706
1 changed files with 3 additions and 4 deletions
|
@ -3050,7 +3050,7 @@ reconnect:
|
|||
while ((ret = mbedtls_ssl_write_early_data(&ssl, buf + written,
|
||||
len - written)) < 0) {
|
||||
if (ret == MBEDTLS_ERR_SSL_CANNOT_WRITE_EARLY_DATA) {
|
||||
break;
|
||||
goto end_of_early_data;
|
||||
}
|
||||
if (ret != MBEDTLS_ERR_SSL_WANT_READ &&
|
||||
ret != MBEDTLS_ERR_SSL_WANT_WRITE &&
|
||||
|
@ -3069,15 +3069,14 @@ reconnect:
|
|||
#endif
|
||||
}
|
||||
}
|
||||
if (ret == MBEDTLS_ERR_SSL_CANNOT_WRITE_EARLY_DATA) {
|
||||
break;
|
||||
}
|
||||
|
||||
frags++;
|
||||
written += ret;
|
||||
} while (written < len);
|
||||
}
|
||||
|
||||
end_of_early_data:
|
||||
|
||||
buf[written] = '\0';
|
||||
mbedtls_printf(
|
||||
" %" MBEDTLS_PRINTF_SIZET " bytes of early data written in %" MBEDTLS_PRINTF_SIZET " fragments\n\n%s\n",
|
||||
|
|
Loading…
Reference in a new issue