2019-07-08 05:10 AM
iam getting following error when i am trying to connect with grovestream iam using en.xcubec-cld-gen
following are theerrors iam getting
***** Grovestreams HTTP Cloud application *****
Opening connection to server grovestreams.com.
H:/TRIAL/STM32CubeExpansion_Cloud_CLD_GEN_V1.0.0/Middlewares/Third_Party/mbedTLS/library/ssl_tls.c:3518: bad message length
H:/TRIAL/STM32CubeExpansion_Cloud_CLD_GEN_V1.0.0/Middlewares/Third_Party/mbedTLS/library/ssl_tls.c:3729: mbedtls_ssl_read_record_layer() returned -29184 (-0x7200)
H:/TRIAL/STM32CubeExpansion_Cloud_CLD_GEN_V1.0.0/Middlewares/Third_Party/mbedTLS/library/ssl_tls.c:4360: mbedtls_ssl_read_record() returned -29184 (-0x7200)
can any one help me to solve this issue
ERROR: net_sock_open_mbedtls L#334 failed
! mbedtls_ssl_handshake returned -0x7200
ERROR: net_sock_open_mbedtls L#338 Failed closing the socket.
ERROR: http_connect L#132 Could not open a socket.
error -1 opening connection to server grovestreams.com
2019-08-13 06:00 AM
mbedTLS error -0x7200 means "invalid record". It can be a lot of different reasons. Are there other errors before ? Does it happen systematically ? More details would be interesting to understand the problem.
2019-08-21 06:19 AM
"ssl_tls.c:3518: bad message length" is often an indication that the internal TLS buffer of mbedtls is overflowed.
It appears that the size of the x509 trust chain of groovestreams HTTPS server has increased since the publication of X-CUBE-CLD-GEN V1.0.0.
The solution is to increase MBEDTLS_SSL_MAX_CONTENT_LEN to 6000, for instance, in grovestreams_mbdetls_config.h.
The reason why MBEDTLS_SSL_MAX_CONTENT_LEN is not set to the TLS worst case (16k) is that is would consume too much RAM for an MCU: A trade-off is needed.