Issue while retrieving data, greater than 4KB, returns -0x7200.
We are using mbed TLS 2.4.0 branch released 2016-10-17 on our Marvell MW30x board.
We have done a simple rest api based Amazon Voice service application. HTTPS rest API is used in AVS. The issue we have is that after successfully sending the request we receive
-0x7200 error while receiving the response data. AVS sends MP3 audio as response to the request. So we played around this a little and figured out that when the response size (Mp3 audio) is around 3700 bytes the response is fully received without any issue. And every time response size is over 4k bytes
-29184 (Invalid SSL record).
MBEDTLS_SSL_MAX_CONTENT_LEN is set to 4k bytes.
Please help with any pointers to fix this issue
thanks & regards, Sahil
"MBEDTLS_SSL_MAX_CONTENT_LEN is set to 4k bytes and causes an error when receiving 4k".
Set to a value large enough to receive the actual response.
This is what is set up in Amazon's client reference - probably because 4k is rather critical:
define MBEDTLS_SSL_MAX_CONTENT_LEN 8192 /**< Maxium fragment length in bytes, determines the size of each of the two internal I/O buffers */
By the way is there a way where the server accepts values bellow 8K such as 2k or 4k (either via renogotiation). Because, I really have a memory issue allocating two buffers of each 8k.. is just too much for my hardware.. 4K would be acceptable.
Thanks in advance.
MBEDTLS_SSL_MAX_CONTENT_LEN and the server is sending more than 8 KB, it is reasonable you get the error, since the message is not complete.
Please verify you have defined
MBEDTLS_SSL_MAX_FRAGMENT_LENGTH. This should limit the maximal size sent to
MBEDTLS_SSL_MAX_CONTENT_LEN , assuming the remote side supports Max Fragment Length extension.
Mbed TLS Team member
Thank you Mark and Ron. It is working fine now after changing
I have also faced the same problem in my Gmail account it's creat problem while retrieving the data regarding this I contact to the https://mailhelp.net/ and told them the problem their assistants worked hard to give the best solution and my problem will be solved