axel-download-accelerator / axel

Lightweight CLI download accelerator
GNU General Public License v2.0
2.93k stars 263 forks source link

add SSL library abstraction layer and support mbedtls #76

Open ordex opened 7 years ago

ordex commented 7 years ago

given that axel is focussed on being small in size, I think it would make sense to make it work with mbedtls and let the user choose (at compile time) which SSL library to use. This may help axel spreading around also on embedded platforms.

ismaell commented 7 years ago

Indeed. In the process we could build some common abstraction. It would be nice to support WolfSSL too.

ordex commented 7 years ago

Yeah, that makes sense. What I have in mind is some kind of common abstraction layer made up by a set of functions that are attached to a different implementation based on what library we choose.

In theory we also have libreSSL and OpenSSL-1.1 which may require attention at some point. Although I personally would prefer not to support too many, otherwise it may become time consuming to maintain them.

ismaell commented 7 years ago

I am testing against LibreSSL already.

Is there any incompatible changes in OpenSSL 1.1?

ordex commented 7 years ago

API has partly changed. Also some objects have to be handled differently. But axel does not use the SSL API that heavily..therefore it may also be that it will just work.

ordex commented 7 years ago

libtls could be used as intermediate layer. It's a generic layer exposing a simple TLS API that is currently implemented by libreSSL and OpenSSL. porting to mbedtls should not be difficult too.

ismaell commented 7 years ago

I'm trying to locate a patch implementing TLS support through libtls for an older version of axel.

ordex commented 7 years ago

in my libtls branch it is possible to find a PoC for switching to libtls.

ismaell commented 2 years ago

Note: I confirmed wolfSSL to work and added support in commit 0759374239acaeac4105f4851cfabc28433f3bcd.