Mbed TLS on FreeRTOS, lwip

Hi,

I’m currently able to download file from Http Server using LWIP functions on FreeRTOS platform.
Now to make the connection secure, I have integrated MBED TLS Stack. My client Hello is getting successfully written and I’m not receiving any response from the server and it stays there indefinitely. Please find the logs below:

Gets stuck at in_left: 0, nb_want: 5

Log:
[2020-03-13 18:28:52.505] . Seeding the random number generator…
[2020-03-13 18:28:52.521] ok
[2020-03-13 18:28:52.521] . Loading the CA root certificate …
[2020-03-13 18:28:52.533] ok (0 skipped)
[2020-03-13 18:28:52.537] . Connecting to tcp/developer.mbed.org/443…
[2020-03-13 18:28:55.597] ok
[2020-03-13 18:28:55.597] . Setting up the SSL/TLS structure…
[2020-03-13 18:28:55.605] ok
[2020-03-13 18:28:55.617] . Performing the SSL/TLS handshake…
[2020-03-13 18:28:55.617] …/Drivers/mbedtls/library/ssl_tls.c:8086: => handshake
[2020-03-13 18:28:55.625]
[2020-03-13 18:28:55.625] …/Drivers/mbedtls/library/ssl_cli.c:3512: client state: 0
[2020-03-13 18:28:55.625]
[2020-03-13 18:28:55.625] …/Drivers/mbedtls/library/ssl_tls.c:2757: => flush output
[2020-03-13 18:28:55.633]
[2020-03-13 18:28:55.633] …/Drivers/mbedtls/library/ssl_tls.c:2769: <= flush output
[2020-03-13 18:28:55.637]
[2020-03-13 18:28:55.637] …/Drivers/mbedtls/library/ssl_cli.c:3512: client state: 1
[2020-03-13 18:28:55.653]
[2020-03-13 18:28:55.653] …/Drivers/mbedtls/library/ssl_tls.c:2757: => flush output
[2020-03-13 18:28:55.653]
[2020-03-13 18:28:55.653] …/Drivers/mbedtls/library/ssl_tls.c:2769: <= flush output
[2020-03-13 18:28:55.653]
[2020-03-13 18:28:55.653] …/Drivers/mbedtls/library/ssl_cli.c:0776: => write client hello
[2020-03-13 18:28:55.665]
[2020-03-13 18:28:55.665] …/Drivers/mbedtls/library/ssl_cli.c:0814: client hello, max version: [3:3]
[2020-03-13 18:28:55.665]
[2020-03-13 18:28:55.665] …/Drivers/mbedtls/library/ssl_cli.c:0823: dumping ‘client hello, random bytes’ (32 bytes)
[2020-03-13 18:28:55.681]
[2020-03-13 18:28:55.681] …/Drivers/mbedtls/library/ssl_cli.c:0823: 0000: f5 87 f2 f8 11 68 7e 56 0a 28 07 13 a0 37 01 fd …h~V.(…7…
[2020-03-13 18:28:55.693]
[2020-03-13 18:28:55.693] …/Drivers/mbedtls/library/ssl_cli.c:0823: 0010: 8b 02 52 99 0e db 95 06 50 63 bd 2d 17 da ec b5 …R…Pc.-…
[2020-03-13 18:28:55.701]
[2020-03-13 18:28:55.701] …/Drivers/mbedtls/library/ssl_cli.c:0876: client hello, session id len.: 0
[2020-03-13 18:28:55.705]
[2020-03-13 18:28:55.705] …/Drivers/mbedtls/library/ssl_cli.c:0877: dumping ‘client hello, session id’ (0 bytes)
[2020-03-13 18:28:55.721]
[2020-03-13 18:28:55.721] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: cca8
[2020-03-13 18:28:55.721]
[2020-03-13 18:28:55.721] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: cca9
[2020-03-13 18:28:55.733]
[2020-03-13 18:28:55.733] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: ccaa
[2020-03-13 18:28:55.733]
[2020-03-13 18:28:55.733] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c02c
[2020-03-13 18:28:55.749]
[2020-03-13 18:28:55.749] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c030
[2020-03-13 18:28:55.749]
[2020-03-13 18:28:55.749] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 009f
[2020-03-13 18:28:55.761]
[2020-03-13 18:28:55.761] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0ad
[2020-03-13 18:28:55.761]
[2020-03-13 18:28:55.773] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c09f
[2020-03-13 18:28:55.777]
[2020-03-13 18:28:55.777] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c024
[2020-03-13 18:28:55.777]
[2020-03-13 18:28:55.777] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c028
[2020-03-13 18:28:55.793]
[2020-03-13 18:28:55.793] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 006b
[2020-03-13 18:28:55.793]
[2020-03-13 18:28:55.793] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c00a
[2020-03-13 18:28:55.805]
[2020-03-13 18:28:55.805] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c014
[2020-03-13 18:28:55.809]
[2020-03-13 18:28:55.809] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0039
[2020-03-13 18:28:55.825]
[2020-03-13 18:28:55.825] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0af
[2020-03-13 18:28:55.825]
[2020-03-13 18:28:55.825] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0a3
[2020-03-13 18:28:55.833]
[2020-03-13 18:28:55.833] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c087
[2020-03-13 18:28:55.837]
[2020-03-13 18:28:55.849] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c08b
[2020-03-13 18:28:55.849]
[2020-03-13 18:28:55.849] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c07d
[2020-03-13 18:28:55.849]
[2020-03-13 18:28:55.849] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c073
[2020-03-13 18:28:55.861]
[2020-03-13 18:28:55.861] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c077
[2020-03-13 18:28:55.865]
[2020-03-13 18:28:55.865] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00c4
[2020-03-13 18:28:55.881]
[2020-03-13 18:28:55.881] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0088
[2020-03-13 18:28:55.881]
[2020-03-13 18:28:55.881] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c02b
[2020-03-13 18:28:55.889]
[2020-03-13 18:28:55.889] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c02f
[2020-03-13 18:28:55.901]
[2020-03-13 18:28:55.901] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 009e
[2020-03-13 18:28:55.901]
[2020-03-13 18:28:55.901] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0ac
[2020-03-13 18:28:55.917]
[2020-03-13 18:28:55.917] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c09e
[2020-03-13 18:28:55.917]
[2020-03-13 18:28:55.917] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c023
[2020-03-13 18:28:55.929]
[2020-03-13 18:28:55.929] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c027
[2020-03-13 18:28:55.933]
[2020-03-13 18:28:55.933] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0067
[2020-03-13 18:28:55.945]
[2020-03-13 18:28:55.945] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c009
[2020-03-13 18:28:55.945]
[2020-03-13 18:28:55.949] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c013
[2020-03-13 18:28:55.957]
[2020-03-13 18:28:55.957] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0033
[2020-03-13 18:28:55.965]
[2020-03-13 18:28:55.965] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0ae
[2020-03-13 18:28:55.969]
[2020-03-13 18:28:55.969] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0a2
[2020-03-13 18:28:55.985]
[2020-03-13 18:28:55.985] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c086
[2020-03-13 18:28:55.985]
[2020-03-13 18:28:55.985] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c08a
[2020-03-13 18:28:55.997]
[2020-03-13 18:28:55.997] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c07c
[2020-03-13 18:28:55.997]
[2020-03-13 18:28:55.997] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c072
[2020-03-13 18:28:56.013]
[2020-03-13 18:28:56.013] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c076
[2020-03-13 18:28:56.013]
[2020-03-13 18:28:56.013] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00be
[2020-03-13 18:28:56.025]
[2020-03-13 18:28:56.025] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0045
[2020-03-13 18:28:56.033]
[2020-03-13 18:28:56.033] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: ccac
[2020-03-13 18:28:56.033]
[2020-03-13 18:28:56.033] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: ccad
[2020-03-13 18:28:56.045]
[2020-03-13 18:28:56.045] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00ab
[2020-03-13 18:28:56.049]
[2020-03-13 18:28:56.049] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0a7
[2020-03-13 18:28:56.065]
[2020-03-13 18:28:56.065] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c038
[2020-03-13 18:28:56.065]
[2020-03-13 18:28:56.065] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00b3
[2020-03-13 18:28:56.073]
[2020-03-13 18:28:56.073] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c036
[2020-03-13 18:28:56.081]
[2020-03-13 18:28:56.081] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0091
[2020-03-13 18:28:56.085]
[2020-03-13 18:28:56.097] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c091
[2020-03-13 18:28:56.097]
[2020-03-13 18:28:56.097] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c09b
[2020-03-13 18:28:56.101]
[2020-03-13 18:28:56.101] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c097
[2020-03-13 18:28:56.113]
[2020-03-13 18:28:56.113] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0ab
[2020-03-13 18:28:56.113]
[2020-03-13 18:28:56.117] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00aa
[2020-03-13 18:28:56.125]
[2020-03-13 18:28:56.125] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0a6
[2020-03-13 18:28:56.133]
[2020-03-13 18:28:56.133] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c037
[2020-03-13 18:28:56.137]
[2020-03-13 18:28:56.149] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00b2
[2020-03-13 18:28:56.153]
[2020-03-13 18:28:56.153] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c035
[2020-03-13 18:28:56.153]
[2020-03-13 18:28:56.153] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0090
[2020-03-13 18:28:56.164]
[2020-03-13 18:28:56.164] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c090
[2020-03-13 18:28:56.168]
[2020-03-13 18:28:56.168] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c096
[2020-03-13 18:28:56.184]
[2020-03-13 18:28:56.184] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c09a
[2020-03-13 18:28:56.184]
[2020-03-13 18:28:56.184] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0aa
[2020-03-13 18:28:56.192]
[2020-03-13 18:28:56.192] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 009d
[2020-03-13 18:28:56.196]
[2020-03-13 18:28:56.196] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c09d
[2020-03-13 18:28:56.212]
[2020-03-13 18:28:56.212] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 003d
[2020-03-13 18:28:56.212]
[2020-03-13 18:28:56.212] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0035
[2020-03-13 18:28:56.220]
[2020-03-13 18:28:56.220] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c032
[2020-03-13 18:28:56.228]
[2020-03-13 18:28:56.228] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c02a
[2020-03-13 18:28:56.232]
[2020-03-13 18:28:56.232] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c00f
[2020-03-13 18:28:56.248]
[2020-03-13 18:28:56.248] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c02e
[2020-03-13 18:28:56.248]
[2020-03-13 18:28:56.248] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c026
[2020-03-13 18:28:56.260]
[2020-03-13 18:28:56.260] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c005
[2020-03-13 18:28:56.260]
[2020-03-13 18:28:56.260] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0a1
[2020-03-13 18:28:56.276]
[2020-03-13 18:28:56.276] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c07b
[2020-03-13 18:28:56.276]
[2020-03-13 18:28:56.276] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00c0
[2020-03-13 18:28:56.284]
[2020-03-13 18:28:56.284] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0084
[2020-03-13 18:28:56.296]
[2020-03-13 18:28:56.296] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c08d
[2020-03-13 18:28:56.296]
[2020-03-13 18:28:56.300] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c079
[2020-03-13 18:28:56.308]
[2020-03-13 18:28:56.308] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c089
[2020-03-13 18:28:56.316]
[2020-03-13 18:28:56.316] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c075
[2020-03-13 18:28:56.320]
[2020-03-13 18:28:56.332] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 009c
[2020-03-13 18:28:56.336]
[2020-03-13 18:28:56.336] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c09c
[2020-03-13 18:28:56.336]
[2020-03-13 18:28:56.336] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 003c
[2020-03-13 18:28:56.348]
[2020-03-13 18:28:56.348] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 002f
[2020-03-13 18:28:56.348]
[2020-03-13 18:28:56.348] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c031
[2020-03-13 18:28:56.364]
[2020-03-13 18:28:56.364] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c029
[2020-03-13 18:28:56.364]
[2020-03-13 18:28:56.364] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c00e
[2020-03-13 18:28:56.376]
[2020-03-13 18:28:56.376] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c02d
[2020-03-13 18:28:56.384]
[2020-03-13 18:28:56.384] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c025
[2020-03-13 18:28:56.384]
[2020-03-13 18:28:56.396] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c004
[2020-03-13 18:28:56.400]
[2020-03-13 18:28:56.400] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0a0
[2020-03-13 18:28:56.400]
[2020-03-13 18:28:56.400] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c07a
[2020-03-13 18:28:56.412]
[2020-03-13 18:28:56.412] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00ba
[2020-03-13 18:28:56.416]
[2020-03-13 18:28:56.424] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0041
[2020-03-13 18:28:56.428]
[2020-03-13 18:28:56.428] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c08c
[2020-03-13 18:28:56.432]
[2020-03-13 18:28:56.432] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c078
[2020-03-13 18:28:56.444]
[2020-03-13 18:28:56.444] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c088
[2020-03-13 18:28:56.444]
[2020-03-13 18:28:56.444] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c074
[2020-03-13 18:28:56.456]
[2020-03-13 18:28:56.456] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: ccae
[2020-03-13 18:28:56.472]
[2020-03-13 18:28:56.472] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00ad
[2020-03-13 18:28:56.480]
[2020-03-13 18:28:56.480] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00b7
[2020-03-13 18:28:56.480]
[2020-03-13 18:28:56.480] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0095
[2020-03-13 18:28:56.480]
[2020-03-13 18:28:56.492] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c093
[2020-03-13 18:28:56.492]
[2020-03-13 18:28:56.492] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c099
[2020-03-13 18:28:56.496]
[2020-03-13 18:28:56.496] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00ac
[2020-03-13 18:28:56.508]
[2020-03-13 18:28:56.508] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00b6
[2020-03-13 18:28:56.508]
[2020-03-13 18:28:56.512] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 0094
[2020-03-13 18:28:56.520]
[2020-03-13 18:28:56.520] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c092
[2020-03-13 18:28:56.532]
[2020-03-13 18:28:56.532] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c098
[2020-03-13 18:28:56.532]
[2020-03-13 18:28:56.532] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: ccab
[2020-03-13 18:28:56.544]
[2020-03-13 18:28:56.544] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00a9
[2020-03-13 18:28:56.548]
[2020-03-13 18:28:56.560] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0a5
[2020-03-13 18:28:56.560]
[2020-03-13 18:28:56.560] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00af
[2020-03-13 18:28:56.564]
[2020-03-13 18:28:56.564] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 008d
[2020-03-13 18:28:56.576]
[2020-03-13 18:28:56.576] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c08f
[2020-03-13 18:28:56.576]
[2020-03-13 18:28:56.576] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c095
[2020-03-13 18:28:56.588]
[2020-03-13 18:28:56.588] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0a9
[2020-03-13 18:28:56.596]
[2020-03-13 18:28:56.600] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00a8
[2020-03-13 18:28:56.600]
[2020-03-13 18:28:56.600] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0a4
[2020-03-13 18:28:56.612]
[2020-03-13 18:28:56.612] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 00ae
[2020-03-13 18:28:56.612]
[2020-03-13 18:28:56.612] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: 008c
[2020-03-13 18:28:56.628]
[2020-03-13 18:28:56.628] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c08e
[2020-03-13 18:28:56.628]
[2020-03-13 18:28:56.632] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c094
[2020-03-13 18:28:56.640]
[2020-03-13 18:28:56.640] …/Drivers/mbedtls/library/ssl_cli.c:0924: client hello, add ciphersuite: c0a8
[2020-03-13 18:28:56.648]
[2020-03-13 18:28:56.648] …/Drivers/mbedtls/library/ssl_cli.c:0936: client hello, got 127 ciphersuites (excluding SCSVs)
[2020-03-13 18:28:56.652]
[2020-03-13 18:28:56.664] …/Drivers/mbedtls/library/ssl_cli.c:0945: adding EMPTY_RENEGOTIATION_INFO_SCSV
[2020-03-13 18:28:56.668]
[2020-03-13 18:28:56.668] …/Drivers/mbedtls/library/ssl_cli.c:0994: client hello, compress len.: 1
[2020-03-13 18:28:56.668]
[2020-03-13 18:28:56.668] …/Drivers/mbedtls/library/ssl_cli.c:0996: client hello, compress alg.: 0
[2020-03-13 18:28:56.680]
[2020-03-13 18:28:56.680] …/Drivers/mbedtls/library/ssl_cli.c:0071: client hello, adding server name extension: developer.mbed.org
[2020-03-13 18:28:56.688]
[2020-03-13 18:28:56.688] …/Drivers/mbedtls/library/ssl_cli.c:0188: client hello, adding signature_algorithms extension
[2020-03-13 18:28:56.696]
[2020-03-13 18:28:56.696] …/Drivers/mbedtls/library/ssl_cli.c:0273: client hello, adding supported_elliptic_curves extension
[2020-03-13 18:28:56.704]
[2020-03-13 18:28:56.704] …/Drivers/mbedtls/library/ssl_cli.c:0338: client hello, adding supported_point_formats extension
[2020-03-13 18:28:56.716]
[2020-03-13 18:28:56.716] …/Drivers/mbedtls/library/ssl_cli.c:0520: client hello, adding encrypt_then_mac extension
[2020-03-13 18:28:56.716]
[2020-03-13 18:28:56.716] …/Drivers/mbedtls/library/ssl_cli.c:0554: client hello, adding extended_master_secret extension
[2020-03-13 18:28:56.732]
[2020-03-13 18:28:56.732] …/Drivers/mbedtls/library/ssl_cli.c:1073: client hello, total extension length: 95
[2020-03-13 18:28:56.732]
[2020-03-13 18:28:56.744] …/Drivers/mbedtls/library/ssl_tls.c:3186: => write handshake message
[2020-03-13 18:28:56.748]
[2020-03-13 18:28:56.748] …/Drivers/mbedtls/library/ssl_tls.c:3345: => write record
[2020-03-13 18:28:56.752]
[2020-03-13 18:28:56.752] …/Drivers/mbedtls/library/ssl_tls.c:3425: output record: msgtype = 22, version = [3:1], msglen = 396
[2020-03-13 18:28:56.768]
[2020-03-13 18:28:56.768] …/Drivers/mbedtls/library/ssl_tls.c:3428: dumping ‘output record sent to network’ (401 bytes)
[2020-03-13 18:28:56.768]
[2020-03-13 18:28:56.768] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0000: 16 03 01 01 8c 01 00 01 88 03 03 f5 87 f2 f8 11 …
[2020-03-13 18:28:56.784]
[2020-03-13 18:28:56.784] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0010: 68 7e 56 0a 28 07 13 a0 37 01 fd 8b 02 52 99 0e h~V.(…7…R…
[2020-03-13 18:28:56.796]
[2020-03-13 18:28:56.796] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0020: db 95 06 50 63 bd 2d 17 da ec b5 00 01 00 cc a8 …Pc.-…
[2020-03-13 18:28:56.804]
[2020-03-13 18:28:56.804] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0030: cc a9 cc aa c0 2c c0 30 00 9f c0 ad c0 9f c0 24 …,.0…$
[2020-03-13 18:28:56.816]
[2020-03-13 18:28:56.816] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0040: c0 28 00 6b c0 0a c0 14 00 39 c0 af c0 a3 c0 87 .(.k…9…
[2020-03-13 18:28:56.832]
[2020-03-13 18:28:56.832] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0050: c0 8b c0 7d c0 73 c0 77 00 c4 00 88 c0 2b c0 2f …}.s.w…+./
[2020-03-13 18:28:56.832]
[2020-03-13 18:28:56.832] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0060: 00 9e c0 ac c0 9e c0 23 c0 27 00 67 c0 09 c0 13 …#.'.g…
[2020-03-13 18:28:56.848]
[2020-03-13 18:28:56.848] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0070: 00 33 c0 ae c0 a2 c0 86 c0 8a c0 7c c0 72 c0 76 .3…|.r.v
[2020-03-13 18:28:56.860]
[2020-03-13 18:28:56.860] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0080: 00 be 00 45 cc ac cc ad 00 ab c0 a7 c0 38 00 b3 …E…8…
[2020-03-13 18:28:56.868]
[2020-03-13 18:28:56.868] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0090: c0 36 00 91 c0 91 c0 9b c0 97 c0 ab 00 aa c0 a6 .6…
[2020-03-13 18:28:56.880]
[2020-03-13 18:28:56.880] …/Drivers/mbedtls/library/ssl_tls.c:3428: 00a0: c0 37 00 b2 c0 35 00 90 c0 90 c0 96 c0 9a c0 aa .7…5…
[2020-03-13 18:28:56.892]
[2020-03-13 18:28:56.892] …/Drivers/mbedtls/library/ssl_tls.c:3428: 00b0: 00 9d c0 9d 00 3d 00 35 c0 32 c0 2a c0 0f c0 2e …=.5.2.*…
[2020-03-13 18:28:56.904]
[2020-03-13 18:28:56.904] …/Drivers/mbedtls/library/ssl_tls.c:3428: 00c0: c0 26 c0 05 c0 a1 c0 7b 00 c0 00 84 c0 8d c0 79 .&…{…y
[2020-03-13 18:28:56.912]
[2020-03-13 18:28:56.912] …/Drivers/mbedtls/library/ssl_tls.c:3428: 00d0: c0 89 c0 75 00 9c c0 9c 00 3c 00 2f c0 31 c0 29 …u…<./.1.)
[2020-03-13 18:28:56.924]
[2020-03-13 18:28:56.924] …/Drivers/mbedtls/library/ssl_tls.c:3428: 00e0: c0 0e c0 2d c0 25 c0 04 c0 a0 c0 7a 00 ba 00 41 …-.%…z…A
[2020-03-13 18:28:56.936]
[2020-03-13 18:28:56.936] …/Drivers/mbedtls/library/ssl_tls.c:3428: 00f0: c0 8c c0 78 c0 88 c0 74 cc ae 00 ad 00 b7 00 95 …x…t…
[2020-03-13 18:28:56.948]
[2020-03-13 18:28:56.948] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0100: c0 93 c0 99 00 ac 00 b6 00 94 c0 92 c0 98 cc ab …
[2020-03-13 18:28:56.956]
[2020-03-13 18:28:56.956] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0110: 00 a9 c0 a5 00 af 00 8d c0 8f c0 95 c0 a9 00 a8 …
[2020-03-13 18:28:56.968]
[2020-03-13 18:28:56.968] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0120: c0 a4 00 ae 00 8c c0 8e c0 94 c0 a8 00 ff 01 00 …
[2020-03-13 18:28:56.980]
[2020-03-13 18:28:56.980] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0130: 00 5f 00 00 00 17 00 15 00 00 12 64 65 76 65 6c ._…devel
[2020-03-13 18:28:56.992]
[2020-03-13 18:28:56.992] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0140: 6f 70 65 72 2e 6d 62 65 64 2e 6f 72 67 00 0d 00 oper.mbed.org
[2020-03-13 18:28:57.000]
[2020-03-13 18:28:57.000] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0150: 16 00 14 06 03 06 01 05 03 05 01 04 03 04 01 03 …
[2020-03-13 18:28:57.012]
[2020-03-13 18:28:57.012] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0160: 03 03 01 02 03 02 01 00 0a 00 18 00 16 00 19 00 …
[2020-03-13 18:28:57.020]
[2020-03-13 18:28:57.020] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0170: 1c 00 18 00 1b 00 17 00 16 00 1a 00 15 00 14 00 …
[2020-03-13 18:28:57.032]
[2020-03-13 18:28:57.032] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0180: 13 00 12 00 0b 00 02 01 00 00 16 00 00 00 17 00 …
[2020-03-13 18:28:57.044]
[2020-03-13 18:28:57.044] …/Drivers/mbedtls/library/ssl_tls.c:3428: 0190: 00 .
[2020-03-13 18:28:57.052]
[2020-03-13 18:28:57.052] …/Drivers/mbedtls/library/ssl_tls.c:2757: => flush output
[2020-03-13 18:28:57.052]
[2020-03-13 18:28:57.060] …/Drivers/mbedtls/library/ssl_tls.c:2776: message length: 401, out_left: 401
[2020-03-13 18:28:57.064]
[2020-03-13 18:28:57.100] …/Drivers/mbedtls/library/ssl_tls.c:2781: ssl->f_send() returned 401 (-0xfffffe6f)
[2020-03-13 18:28:57.108]
[2020-03-13 18:28:57.108] …/Drivers/mbedtls/library/ssl_tls.c:2809: <= flush output
[2020-03-13 18:28:57.120]
[2020-03-13 18:28:57.120] …/Drivers/mbedtls/library/ssl_tls.c:3478: <= write record
[2020-03-13 18:28:57.120]
[2020-03-13 18:28:57.120] …/Drivers/mbedtls/library/ssl_tls.c:3322: <= write handshake message
[2020-03-13 18:28:57.132]
[2020-03-13 18:28:57.132] …/Drivers/mbedtls/library/ssl_cli.c:1108: <= write client hello
[2020-03-13 18:28:57.132]
[2020-03-13 18:28:57.132] …/Drivers/mbedtls/library/ssl_cli.c:3512: client state: 2
[2020-03-13 18:28:57.148]
[2020-03-13 18:28:57.148] …/Drivers/mbedtls/library/ssl_tls.c:2757: => flush output
[2020-03-13 18:28:57.148]
[2020-03-13 18:28:57.148] …/Drivers/mbedtls/library/ssl_tls.c:2769: <= flush output
[2020-03-13 18:28:57.148]
[2020-03-13 18:28:57.152] …/Drivers/mbedtls/library/ssl_cli.c:1501: => parse server hello
[2020-03-13 18:28:57.160]
[2020-03-13 18:28:57.160] …/Drivers/mbedtls/library/ssl_tls.c:4313: => read record
[2020-03-13 18:28:57.160]
[2020-03-13 18:28:57.164] …/Drivers/mbedtls/library/ssl_tls.c:2538: => fetch input
[2020-03-13 18:28:57.172]
[2020-03-13 18:28:57.180] …/Drivers/mbedtls/library/ssl_tls.c:2699: in_left: 0, nb_want: 5
[2020-03-13 18:28:57.180]

Hi @akashr3
Thank you for your question!
It seems that your bio callbacks are not working as expected.
Have you ported the right callbacks and set them through mbedtls_ssl_set_bio() to use LWIP?

Have you check through a network sniffer (such as wireshark) that the data is actually being sent?
Have you checked in the server logs that it received the messages?
regards,
Mbed TLS Support
Ron

Hi Ron,
Thanks for responding.

I have ported the LWIP Read and LWIP Write functions to the specific mbedtls_net_recv and mbedtls_net_send correspondingly.

I have enabled MBEDTLS_NET_C in config.h file though I’m using on FreeRTOS.

I’m using a GSM module, so I can’t troubleshoot with wireshark. Checked the server logs and it was able to receive the 5 bytes request from the client.

Hi Akasha,
From your description I understand you have access to server logs.
Did the Server receive the whole Client Hello message? It should be bigger than 5 bytes(401 which includes the 5 bytes header and the 396 bytes message)
There is no 5 bytes request from the Client.
Every time, the server\ Client wants to read the initial 5 bytes, which is the TLS header, to understand the message type and length.
Please share server logs as well
Regards