mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

Evolution of net_sockets.h in 4.0

Open daverodgman opened this issue 4 years ago • 2 comments

As a first step, explore this issue and determine the best course of action for Mbed TLS 3.0. Options could include:

  • do nothing
  • move most of the content into a new file outside of the main library

Mailing list discussion: https://lists.trustedfirmware.org/pipermail/mbed-tls/2020-April/000052.html

This is part of #4030

daverodgman avatar Jan 27 '21 22:01 daverodgman

I don't think there was a strong agreement on the list. The option most likely to eventually get a consensus would be to turn it into a part of a new platform_unix / platform_windows module to be designed.

I think this would require more design work that we can afford for 3.0, and since we agreed to limit 3.0 to simple changes, I'm inclined to post-pone that one to 4.0 and just keep net_sockets as it is for 3.0.

mpg avatar Feb 24 '21 10:02 mpg

Given unlimited time, my preference would be to design a new platform module, which would combine things that are today in platform, entropy_poll, timing, net_sockets, etc. We would maintain at least a Unix/POSIX implementation and a Windows implementation of this module — the set of platforms for which we'd maintain an implementation should be the set of platforms we run CI on. OSes that include Mbed TLS and for which our Unix/POSIX implementation doesn't work would maintain their own implementation of this module. This is way out of scope of 3.0.

net_sockets is pretty much what TLS needs. If we move it out of the library, we'd still have to maintain it for the test and sample programs. All we'd gain is that test code needs less robustness. So we lose very little by doing nothing. Doing nothing has my vote.

gilles-peskine-arm avatar Feb 24 '21 11:02 gilles-peskine-arm