Re: Problem with mbedtls

Vakul Garg <vakul.garg@...>

Hi Clemence

I was also trying to use mbedtls on frdm-k64f when I encountered handshake errors.
In my case, I used zephyr sample app mbedtls_sslclient.

See if the problem you are seeing is related to bug report I logged.



-----Original Message-----
From: devel@... [mailto:devel@...]
On Behalf Of clemence
Sent: Monday, May 14, 2018 10:07 PM
To: devel@...
Subject: [Zephyr-devel] Problem with mbedtls


I am trying to use mbedtls with a NXP FRDM-K64F to connect to a server.

I get in the function "mbedtls_ssl_handshake_client_step"

I go in the case: MBEDTLS_SSL_SERVER_HELLO. The client send the message
"Client Hello" and the server receive it.

Then I go in: MBEDTLS_SSL_SERVER_CERTIFICATE. The server send the
"Server Hello" put it seems that the client does not receive it. Then the code
stop there and does not go to the other case.

It looks like that the client cannot get the message from the server and wait
for an answer.

This is the log I get when I get in the case

###########=> flush output
ssl_tls.c:2473: |2| => flush output
###########<= flush output
ssl_tls.c:2485: |2| <= flush output
=================> les secondes = 6
=> parse server hello
message =
=> read record: ssl->keep_current_message = 0 =================>
mbedtls_ssl_read_record = les secondes = 6 mbedtls_ssl_read_record_layer,
in => fetch input
0 - in_left: 0, nb_want: 5
=================> les secondes = 6
1 - in
12- in
END net_context_recv !!!!!
rc == 0
&&&&&  MIDDLE 0
***** BUS FAULT *****
  Executing thread ID (thread): 0x2000c334
  Faulting instruction address:  0x3a04
  Precise data bus error
  Address: 0x11f3804c
Fatal fault in thread 0x2000c334! Aborting.
net_pkt_get_tx !!!!
=================> les secondes = 16
return net_pkt_get_tx
return pkt
net_send_data !!!
END net_send_data

The code is stuck in the the function "net_context_recv" in the file

How can I fix this problem ?



Join to automatically receive all group messages.