Re: [lwip-users] PolarSSL and mbedTLS

2018-05-10 Thread E.Vasylyev
@Simon! I was reading your posts on this forum and saw that you managed to use "mbedtls_ssl_conf_max_frag_len" function to get the request sent through SSL be fragmented. Can you please advise how you managed to make it work? I am doing a HTTPS server and one of the options is a file upload (size

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-26 Thread Mikael Eiman
; > Thanks for everyone answering and giving ideas J > > Great work LwIP team. > > BR, > Noam. > > From: lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] On > Behalf Of Noam Weissman > Sent: Thursday, March 16, 2017 5:58 PM > To: Mailing lis

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-26 Thread Noam Weissman
LwIP team. BR, Noam. From: lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] On Behalf Of Noam Weissman Sent: Thursday, March 16, 2017 5:58 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] PolarSSL and mbedTLS Simon, I am not saying that LwIP has bugs because I am no

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-16 Thread Noam Weissman
-bounces+noam=silrd@nongnu.org] On Behalf Of goldsimon Sent: Thursday, March 16, 2017 5:37 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] PolarSSL and mbedTLS From all information given so far, I fail to see how this would be an lwip problem. Did you test your SSL application on a

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-16 Thread Dr. Jan Menzel
ssage- > From: lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] On > Behalf Of Jan Menzel > Sent: Wednesday, March 15, 2017 10:54 PM > To: lwip-users@nongnu.org > Subject: Re: [lwip-users] PolarSSL and mbedTLS > > Hi Noam! > Did you follow th

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-16 Thread goldsimon
wip-users [mailto:lwip-users-bounces+noam=silrd....@nongnu.org] >On Behalf Of Jan Menzel >Sent: Wednesday, March 15, 2017 10:54 PM >To: lwip-users@nongnu.org >Subject: Re: [lwip-users] PolarSSL and mbedTLS > >Hi Noam! > Did you follow the error code through mbedtls's net.c?

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-16 Thread Noam Weissman
+noam=silrd@nongnu.org] On Behalf Of Jan Menzel Sent: Wednesday, March 15, 2017 10:54 PM To: lwip-users@nongnu.org Subject: Re: [lwip-users] PolarSSL and mbedTLS Hi Noam! Did you follow the error code through mbedtls's net.c? In my code its translated into "MBEDTLS_ERR_SSL_WAN

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-15 Thread Jan Menzel
> Noam. > > > > -Original Message- > From: lwip-users [mailto:lwip-users-bounces+noam=silrd....@nongnu.org] On > Behalf Of Simon Goldschmidt > Sent: Friday, March 10, 2017 10:36 AM > To: lwip-users@nongnu.org > Subject: Re: [lwip-users] PolarSSL and mbedTLS >

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-15 Thread goldsi...@gmx.de
Noam Weissman wrote: Any ideas ? No, sorry. I'm sure I could find this when debugging myself, but I keep getting lost in your descriptions and I haven't yet seen one thing that springs to mind to say "this is it"... Simon ___ lwip-users mailing l

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-15 Thread Noam Weissman
- From: lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] On Behalf Of Simon Goldschmidt Sent: Friday, March 10, 2017 10:36 AM To: lwip-users@nongnu.org Subject: Re: [lwip-users] PolarSSL and mbedTLS Noam Weissman wrote: > I get a read error inside lwip_recvfrom funct

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-14 Thread Noam Weissman
, March 14, 2017 4:36 PM To: lwip-users@nongnu.org Subject: Re: [lwip-users] PolarSSL and mbedTLS Hi Noam! IIRC this options is not widely implemented. Especially openssl seems to lack it. If you configure a short FRAGMENT_LENGTH and the other side does not respect the option, transfer of

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-14 Thread Dr. Jan Menzel
is > > data to read. > > > BR, > > Noam. > > > > > ------------ > *From:* lwip-users on > behalf of goldsi...@gmx.de > *Sent:* Saturday, March 11, 2017 9:34 PM > *To:* Mailing lis

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-14 Thread Jan Menzel
nks for everyone that puts their inputs J > > > > If I will have an update I will update the group. > > > > BR, > > Noam. > > > > *From:*lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] > *On Behalf Of *Noam Weissman > *S

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-12 Thread Noam Weissman
bject: Re: [lwip-users] PolarSSL and mbedTLS Hi Simon, with SSL there is a read for 5 bytes record header and then reading the data itself as a whole or in parts (inside lwip_recvfrom). My module is a single task that has a state machine. When the state is in OPEN state it blocks for 1

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-11 Thread Noam Weissman
something stupid :-) BR, Noam. From: lwip-users on behalf of goldsi...@gmx.de Sent: Saturday, March 11, 2017 11:29 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] PolarSSL and mbedTLS Noam, that sounds a bit too complicatied... My first thought is

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-11 Thread goldsi...@gmx.de
Noam, that sounds a bit too complicatied... My first thought is: you call select and it returns that there is data to read, but that does not mean there is enough data to read for TLS, so EWOULDBLOCK is not an error at all in this case. Simon ___

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-11 Thread Noam Weissman
___ From: lwip-users on behalf of goldsi...@gmx.de Sent: Saturday, March 11, 2017 9:34 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] PolarSSL and mbedTLS Noam Weissman wrote: I am not ignoring the fact that it may be the driver or definitions but I am simply asking for leads... That

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-11 Thread goldsi...@gmx.de
Noam Weissman wrote: I am not ignoring the fact that it may be the driver or definitions but I am simply asking for leads... That's what I thought I gave in the last mail. OTOH, for getting the errno set by recvfrom, you don't have to be an lwIP developer... Simon

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-10 Thread Noam Weissman
:35 AM To: lwip-users@nongnu.org Subject: Re: [lwip-users] PolarSSL and mbedTLS Noam Weissman wrote: > I get a read error inside lwip_recvfrom function. > [..] > If anyone has any ideas on what more to check or test please respond. 1: Get an idea of the error (if recvfrom returns -1, w

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-10 Thread Simon Goldschmidt
Noam Weissman wrote: > I get a read error inside lwip_recvfrom function. > [..] > If anyone has any ideas on what more to check or test please respond. 1: Get an idea of the error (if recvfrom returns -1, what's the corrent errno?) 2: Get a debugger and try to find out why recvfrom returns an erro

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-10 Thread Noam Weissman
n what more to check or test please respond. BR, Noam. From: lwip-users on behalf of Noam Weissman Sent: Friday, March 3, 2017 5:50 PM To: lwip-users@nongnu.org Subject: Re: [lwip-users] PolarSSL and mbedTLS Hi Jan, Thanks for a super reply. I will ch

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-03 Thread Noam Weissman
pointed out. I will check all the points you mentioned. Thanks again, have a great weekend, Noam. From: lwip-users on behalf of Jan Menzel Sent: Friday, March 3, 2017 5:29 PM To: lwip-users@nongnu.org Subject: Re: [lwip-users] PolarSSL and mbedTLS Hi Noam

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-03 Thread Jan Menzel
> The read buffer is large and it does have a problem, length is 14829 ? > > Any ideas ?? > > BR, > Noam. > > -Original Message- > From: lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] On > Behalf Of goldsi...@gmx.de > Sent: Wednesday

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-02 Thread Noam Weissman
829 ? Any ideas ?? BR, Noam. -Original Message- From: lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] On Behalf Of goldsi...@gmx.de Sent: Wednesday, March 01, 2017 9:27 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] PolarSSL and mbedTLS I did have mbedT

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-02 Thread Noam Weissman
March 2, 2017 11:24 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] PolarSSL and mbedTLS Noam Weissman wrote: Same problem with either 1.41 or 2.01 tested on both Up to now, EWOULDBLOCK is based on netconn callback events. I'm in the progress of changing this to be a result of

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-02 Thread goldsi...@gmx.de
Noam Weissman wrote: Same problem with either 1.41 or 2.01 tested on both Up to now, EWOULDBLOCK is based on netconn callback events. I'm in the progress of changing this to be a result of a "tryget" operation on the recvmbox. If there should be a bug in the event callback handling, this sho

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-02 Thread Noam Weissman
: Thursday, March 2, 2017 8:54 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] PolarSSL and mbedTLS Noam Weissman wrote: > lwip_recvfrom is called. > > Inside this function there is a do <> while loop that is supposed to collect > the fragments into the 16K buffer >

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-02 Thread goldsi...@gmx.de
Noam Weissman wrote: lwip_recvfrom is called. Inside this function there is a do <> while loop that is supposed to collect the fragments into the 16K buffer and after getting it all return to the SSL for decryption etc... for some reason it always returns with EWOULDBLOCK error ! Which versi

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-02 Thread Noam Weissman
7 8:08 PM To: lwip-users@nongnu.org Subject: Re: [lwip-users] PolarSSL and mbedTLS Hi Noam! With MAX_CONTENT_LEN set to 16k you have to provide more then 32k to the SSL stack. With 64k ssl memory pool, that should be fine. You'll need more memory for extensive math in case you enab

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-02 Thread Jan Menzel
> are there to decrypt. So if it > Works for a small message it should work for a larger message that is > decrypted in chunks anyway. > > Any suggestion for an easy to handle (for testing) WSS server in PHP or > similar ? > > I think you are correct that it is a memory probl

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-02 Thread Jan Menzel
K frame in one pBuf if the sender is sending a large chank. So there > should be something else ? > > > Noam. > > *From:* lwip-users on > behalf of Jan Menzel > *Sent:* Wednesday, March 1, 2017 11:46 PM

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-01 Thread Noam Weissman
will be welcomed :-) BR, Noam. -Original Message- From: lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] On Behalf Of Jan Menzel Sent: Wednesday, March 01, 2017 5:13 PM To: lwip-users@nongnu.org Subject: Re: [lwip-users] PolarSSL and mbedTLS Hi Noam! I've d

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-01 Thread Noam Weissman
is sending a large chank. So there should be something else ? Noam. From: lwip-users on behalf of Jan Menzel Sent: Wednesday, March 1, 2017 11:46 PM To: lwip-users@nongnu.org Subject: Re: [lwip-users] PolarSSL and mbedTLS Hi Noam! SSL/TLS isn't

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-01 Thread Jan Menzel
-- > *From:* lwip-users on > behalf of goldsi...@gmx.de > *Sent:* Wednesday, March 1, 2017 9:26 PM > *To:* Mailing list for lwIP users > *Subject:* Re: [lwip-users] PolarSSL and mbedTLS > > I did have mbedTLS running against our httpd (no sockets) but the &

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-01 Thread Noam Weissman
behalf of goldsi...@gmx.de Sent: Wednesday, March 1, 2017 9:26 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] PolarSSL and mbedTLS I did have mbedTLS running against our httpd (no sockets) but the resource usage was rather high. I'd imagine the problem could be lwIP

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-01 Thread goldsi...@gmx.de
I did have mbedTLS running against our httpd (no sockets) but the resource usage was rather high. I'd imagine the problem could be lwIP's memory configurations here, too. Simon Jan Menzel wrote: Hi Noam! I've designed a system with almost the same setup which works well since a few ye

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-01 Thread Jan Menzel
Hi Noam! I've designed a system with almost the same setup which works well since a few years incl. firmware updates of a ~200kb. Did you checked the memory consumption of the ip stack and the ssl max content length setting? The default max content length setting is IIRC 16kb, which

Re: [lwip-users] PolarSSL and mbedTLS

2017-03-01 Thread Simon Goldschmidt
Noam Weissman wrote: > I have a client, single task using the socket API using and also PolarSSL for > SSL support. > [..] > When I try to send small messages from the server to my client all is working > ok but when I try to push a large > message 6K and up my ssl_read function fails with a read

[lwip-users] PolarSSL and mbedTLS

2017-03-01 Thread Noam Weissman
Hi, I have a client, single task using the socket API using and also PolarSSL for SSL support. The client is WebSocket client and all seems to work ok. When I try to send small messages from the server to my client all is working ok but when I try to push a large message 6K and up my ssl_read