Hi Shruthi, As a continuation to Jan mail...
I am using mbedTLS 2.42 + LwIP 2.02 and it works for me... after some straggling :-) I strongly suggest upgrading to LwIP 1.42 as a minimum. As far as I know there were many fixes from 1.40 to 1.42 mbetTLS has a net_socket.c+h file that is the "porting" file I am working with ST micro and they have added a porting file named retarget.c ... without it, it will not work as the mbedTLS uses printf and standard IO. What micro are you using ?, are you using Linux or another OS. You may need to add some files that are not part of the mbedTLS library ? BR, Noam. -----Original Message----- From: lwip-users [mailto:[email protected]] On Behalf Of Jan Menzel Sent: Tuesday, April 18, 2017 12:31 PM To: [email protected] Subject: Re: [lwip-users] Building mbedtls using LWIP library Hi Shruthi! I'm using mbedtls and lwip on an embedded devices so I can only help integration both if there are no other tcp/ip-stacks around. Basically mbedtls interfaces to any tcp/ip-stack using bsd-socket API. This is archived using the file net.c, which comes with mbedtls such, that it builds on multiple platforms. I'd suggest that you carefully check that all calls to open/close/read/write are correctly linked to lwip. There might be modifications needed - eventually also in lwip - to not use the Linux stack. I think that should be all. Please make sure to enable socked api. You might need to enable support for transmit/receive timeouts and you might wont to make sure, that lwips errno can be/is read insight net.c. Please check the archive of this list as we had recently some discussions regarding mbedtls and the configuration of lwip. Best regards Jan On 18.04.2017 11:02, shruthi wrote: > Hi, > > I am using the LWIP stack(1.4.0 version) as a *tap device (tap0)* on > my Linux system. I have a simple TCP server-client application running > on the LWIP stack. Now I want to add TLS over TCP, and I found that > mbedTLS is one of the recommended libraries to add TLS support on > LWIP. Could you please tell me how to integrate the two? > > I want to make the mbedTLS library use the LWIP library APIs instead > of the Linux APIs. I am new to both these libraries and I am not sure > what changes to make in the Makefiles to build them together. Any > advice/suggestions would be appreciated. > > Regards, > Shruthi > > > > > -- > View this message in context: > http://lwip.100.n7.nabble.com/Building-mbedtls-using-LWIP-library-tp29 > 319.html Sent from the lwip-users mailing list archive at Nabble.com. > > _______________________________________________ > lwip-users mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/lwip-users > _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
