alttcp_tls_mbedtls problems setup a server, "unexpected message"

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

alttcp_tls_mbedtls problems setup a server, "unexpected message"

Mario Luzeiro
I'm using lwIP 2.1.2 trying to setup a https server.
I'm getting an "unexpected message" fail error from the TLS connection,
I suspect that there is an ACK that appears out of order,

I left here some logs:
https://pastebin.com/raw/K8DJYMYW
https://pastebin.com/raw/qyJtdf0X

I read on other old posts that there was some possible related starvation
issues but I don't know it was already solved.

I noticed that my systems hangs and take about 10 seconds to reply to the
"Hello client message" and then, it sends some previous acknowledges. It
does not sounds good to me and maybe the cause of the error.

Any help how can I solve this?




--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: alttcp_tls_mbedtls problems setup a server, "unexpected message"

Mario Luzeiro
I found that changing the TCP_MSS size, increasing it, solve this specific
message error but then I still have another issues. So it looks there is
some relation on the TCP_MSS and TLS

My relevant defines are:
#define TCP_MSS 1024
#define TCP_WND                         (16 * TCP_MSS)
#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH 1
#define MBEDTLS_SSL_MAX_CONTENT_LEN             4096
#define MBEDTLS_ECP_WINDOW_SIZE    7



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: alttcp_tls_mbedtls problems setup a server, "unexpected message"

wilkxt
In reply to this post by Mario Luzeiro
Hi
What microcontroler you use?

czw., 13 cze 2019, 19:04 użytkownik KammutierSpule <[hidden email]> napisał:
I'm using lwIP 2.1.2 trying to setup a https server.
I'm getting an "unexpected message" fail error from the TLS connection,
I suspect that there is an ACK that appears out of order,

I left here some logs:
https://pastebin.com/raw/K8DJYMYW
https://pastebin.com/raw/qyJtdf0X

I read on other old posts that there was some possible related starvation
issues but I don't know it was already solved.

I noticed that my systems hangs and take about 10 seconds to reply to the
"Hello client message" and then, it sends some previous acknowledges. It
does not sounds good to me and maybe the cause of the error.

Any help how can I solve this?




--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: alttcp_tls_mbedtls problems setup a server, "unexpected message"

Mario Luzeiro
Hi Tomek,
I'm using STM32F756ZG, 216Mhz, 320K RAM
there is also some difference when running in debug (slow) or in release (faster)

Could lwIP detect duplicated transmissions and discard it?

Mario

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]> on behalf of tomek wilkxt <[hidden email]>
Sent: 14 June 2019 09:06
To: Mailing list for lwIP users
Subject: Re: [lwip-users] alttcp_tls_mbedtls problems setup a server, "unexpected message"

Hi
What microcontroler you use?

czw., 13 cze 2019, 19:04 użytkownik KammutierSpule <[hidden email]<mailto:[hidden email]>> napisał:
I'm using lwIP 2.1.2 trying to setup a https server.
I'm getting an "unexpected message" fail error from the TLS connection,
I suspect that there is an ACK that appears out of order,

I left here some logs:
https://pastebin.com/raw/K8DJYMYW
https://pastebin.com/raw/qyJtdf0X

I read on other old posts that there was some possible related starvation
issues but I don't know it was already solved.

I noticed that my systems hangs and take about 10 seconds to reply to the
"Hello client message" and then, it sends some previous acknowledges. It
does not sounds good to me and maybe the cause of the error.

Any help how can I solve this?




--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]<mailto:[hidden email]>
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: alttcp_tls_mbedtls problems setup a server, "unexpected message"

wilkxt
You have strong uP. Time between client hello and server hello shuld be about 0.1s. I have stm32f107 and my time is about 1.2s with RSA nad 0.8 with EC.

pt., 14 cze 2019, 10:21 użytkownik Mário Luzeiro <[hidden email]> napisał:
Hi Tomek,
I'm using STM32F756ZG, 216Mhz, 320K RAM
there is also some difference when running in debug (slow) or in release (faster)

Could lwIP detect duplicated transmissions and discard it?

Mario

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]> on behalf of tomek wilkxt <[hidden email]>
Sent: 14 June 2019 09:06
To: Mailing list for lwIP users
Subject: Re: [lwip-users] alttcp_tls_mbedtls problems setup a server, "unexpected message"

Hi
What microcontroler you use?

czw., 13 cze 2019, 19:04 użytkownik KammutierSpule <[hidden email]<mailto:[hidden email]>> napisał:
I'm using lwIP 2.1.2 trying to setup a https server.
I'm getting an "unexpected message" fail error from the TLS connection,
I suspect that there is an ACK that appears out of order,

I left here some logs:
https://pastebin.com/raw/K8DJYMYW
https://pastebin.com/raw/qyJtdf0X

I read on other old posts that there was some possible related starvation
issues but I don't know it was already solved.

I noticed that my systems hangs and take about 10 seconds to reply to the
"Hello client message" and then, it sends some previous acknowledges. It
does not sounds good to me and maybe the cause of the error.

Any help how can I solve this?




--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]<mailto:[hidden email]>
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: alttcp_tls_mbedtls problems setup a server, "unexpected message"

Mario Luzeiro
Is that for a uP working as TLS (https) server?
Could you share the lwIP / mbedTLS defines?

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]> on behalf of tomek wilkxt <[hidden email]>
Sent: 14 June 2019 22:49
To: Mailing list for lwIP users
Subject: Re: [lwip-users] alttcp_tls_mbedtls problems setup a server, "unexpected message"

You have strong uP. Time between client hello and server hello shuld be about 0.1s. I have stm32f107 and my time is about 1.2s with RSA nad 0.8 with EC.

pt., 14 cze 2019, 10:21 użytkownik Mário Luzeiro <[hidden email]<mailto:[hidden email]>> napisał:
Hi Tomek,
I'm using STM32F756ZG, 216Mhz, 320K RAM
there is also some difference when running in debug (slow) or in release (faster)

Could lwIP detect duplicated transmissions and discard it?

Mario

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]<mailto:[hidden email]>> on behalf of tomek wilkxt <[hidden email]<mailto:[hidden email]>>
Sent: 14 June 2019 09:06
To: Mailing list for lwIP users
Subject: Re: [lwip-users] alttcp_tls_mbedtls problems setup a server, "unexpected message"

Hi
What microcontroler you use?

czw., 13 cze 2019, 19:04 użytkownik KammutierSpule <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> napisał:
I'm using lwIP 2.1.2 trying to setup a https server.
I'm getting an "unexpected message" fail error from the TLS connection,
I suspect that there is an ACK that appears out of order,

I left here some logs:
https://pastebin.com/raw/K8DJYMYW
https://pastebin.com/raw/qyJtdf0X

I read on other old posts that there was some possible related starvation
issues but I don't know it was already solved.

I noticed that my systems hangs and take about 10 seconds to reply to the
"Hello client message" and then, it sends some previous acknowledges. It
does not sounds good to me and maybe the cause of the error.

Any help how can I solve this?




--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]<mailto:[hidden email]>
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users