Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-28 Thread Eric Molitor
Attached is a patch which fixes the ifdefs. I'll spend a bit of time reworking the OpenSSL patch and resubmit it in a new thread. On Thu, Oct 28, 2021 at 6:33 PM Eric Molitor wrote: > It's very contrarian but I like ifdefs indented like this. But this isn't > my code base so let me rebase the

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-28 Thread Eric Molitor
It's very contrarian but I like ifdefs indented like this. But this isn't my code base so let me rebase the OpenSSL changes and fix the indenting to match the project style. LibTLS is basically a very thin wrapper which constrains how you hold an SSL library, essentially making it very hard to

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-28 Thread Rob Landley
On 10/28/21 9:57 AM, Eric Molitor wrote: > Ok this annoyed me so I just added direct OpenSSL support parallel to the > LibTLS > support. Elliot, the OpenSSL version should work with the latest versions of > BoringSSL that Android is using. I applied the previous one (the v2 with one library),

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-28 Thread Eric Molitor
This adds in error handling and makes the two options mutually exclusive. On Thu, Oct 28, 2021 at 3:57 PM Eric Molitor wrote: > Ok this annoyed me so I just added direct OpenSSL support parallel to the > LibTLS support. Elliot, the OpenSSL version should work with the latest > versions of

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-28 Thread Eric Molitor
Ok this annoyed me so I just added direct OpenSSL support parallel to the LibTLS support. Elliot, the OpenSSL version should work with the latest versions of BoringSSL that Android is using. - Eric On Thu, Oct 28, 2021 at 1:19 PM Eric Molitor wrote: > Annoyingly libretls requires openssl

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-28 Thread Eric Molitor
Annoyingly libretls requires openssl 1.1.1b or higher which means BoringSSL (1.1.0) is missing the newer IO socket abstractions which libretls is depending upon. Do you know if there are plans to upgrade the interfaces of BoringSSL to support the new API? I was hoping to avoid directly holding the

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-28 Thread Eric Molitor
Reworked TLS patch. This limits the make.sh change to just tls which should resolve any concerns about multiple libraries. This also folds in a few fixes I've found while testing. Elliot this should work with LibreTLS+BoringSSL but I've not had a chance to test that yet. - Eric On Thu, Oct 28,

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-28 Thread Eric Molitor
Let me clean this up first and do a bit more testing to sort the libraries out. Yeah BoringSSL uses the same symbols as older OpenSSL. If you do want to give it a whirl there is a new experimental WGET_TLS suboption to enable in addition to WGET. For BoringSSL you also need to have LibreTLS to

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-28 Thread Eric Molitor
Yeah that would break. Let me take a look to figure out a better way to handle the libraries. - Eric On Thu, 28 Oct 2021, 6:50 am Rob Landley, wrote: > On 10/27/21 11:58 AM, Eric Molitor wrote: > > Final patch which adds TLS support. > > > > - Eric > > Hmmm, the lib stuff is awkward. (If you

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-28 Thread enh via Toybox
Iirc boringssl uses the same library names as openssl. If you want me to try something tomorrow, let me know what. Just change wget to =y in .config and see what libraries I need to add for it to link? On Wed, Oct 27, 2021, 22:50 Rob Landley wrote: > On 10/27/21 11:58 AM, Eric Molitor wrote: >

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-27 Thread Rob Landley
On 10/27/21 11:58 AM, Eric Molitor wrote: > Final patch which adds TLS support. > > - Eric Hmmm, the lib stuff is awkward. (If you have more than one installed, I think it will try to link to both. Which seems unlikely to work? And I dunno what android calls boringssl. It would be nice if there

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-27 Thread Eric Molitor
Final patch which adds TLS support. - Eric On Wed, Oct 27, 2021 at 3:42 PM Eric Molitor wrote: > I missed this change so creating a second patch to apply after the HTTP > 1.1 patch is applied. > > - Eric > > On Wed, Oct 27, 2021 at 1:58 PM Eric Molitor wrote: > >> Agree, that could have been

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-27 Thread Eric Molitor
I missed this change so creating a second patch to apply after the HTTP 1.1 patch is applied. - Eric On Wed, Oct 27, 2021 at 1:58 PM Eric Molitor wrote: > Agree, that could have been better. The attached patch adds HTTP 1.1 and > chunked encoding support. It also cleans up and improves the

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-27 Thread Eric Molitor
Agree, that could have been better. The attached patch adds HTTP 1.1 and chunked encoding support. It also cleans up and improves the header processing and adds comments to explain the logic. This also fixes a bug in the original implementations header processing where it was assumed that the

Re: [Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-26 Thread Rob Landley
On 10/26/21 9:05 AM, Eric Molitor wrote: > Attached is an initial cleanup of wget. This addresses a number of defects > with > the existing implementation and generally cleans up the code. I've squashed > the > commits but can provide a more incremental set of patches if desired. I have > two >

[Toybox] [PATCH] wget: cleanup, add support for file disposition and fix HTTP protocol version

2021-10-26 Thread Eric Molitor
Attached is an initial cleanup of wget. This addresses a number of defects with the existing implementation and generally cleans up the code. I've squashed the commits but can provide a more incremental set of patches if desired. I have two more pending changes which correctly add HTTP 1.1