Skip to content

kboot: Add HTTP client support - #2411

Open
aryanA101a wants to merge 12 commits into
freebsd:mainfrom
aryanA101a:kboot-http-client
Open

kboot: Add HTTP client support#2411
aryanA101a wants to merge 12 commits into
freebsd:mainfrom
aryanA101a:kboot-http-client

Conversation

@aryanA101a

Copy link
Copy Markdown
Contributor

Depends on: #2410

Add an HTTP/1.1 client implementation to kboot.

Project: https://wiki.freebsd.org/SummerOfCode2026Projects/AddNetworkingSupportToKboot
Sponsored by: Google LLC (GSoC 2026)

Obtained from:  https://git.musl-libc.org/cgit/musl
Commit:         5122f9f3c99fee366167c5de98b31546312921ab

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
…5372'

git-subtree-dir: contrib/musl
git-subtree-mainline: c3c6a6c
git-subtree-split: 079bee1
Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
Allow stand consumers to opt out of libsa-specific compiler flags while
retaining the common standalone flags. A follow-up commit will use this for
kboot's musl compatibility library, which needs to compile with musl's headers
instead of libsa's.

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
Add host_unlink() to the host syscall interface.
This will be used by the HTTP file sink in a follow-up commit to remove
incomplete downloads.

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
The kboot HTTP client added in a follow-up commit needs DNS resolution and
Linux socket interfaces. Build a compatibility library from the required musl
resolver and networking sources.
Route allocation, errno, and syscalls through the existing kboot/libsa
runtime.

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
The kboot HTTPS client needs BearSSL's SSL client/engine and X.509 validation,
which are not part of the BearSSL subset built into libsa for loader
verification.

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
Build BearSSL's brssl_ta as a host tool and use it at build time to generate
the trust-anchor table for kboot's HTTPS client from the system CA
certificates.

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
Add the HTTP client and file sink used to download files over HTTP and HTTPS.

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
Add --http-test-get so the HTTP client can be exercised without entering the
loader. This provides an entry point for the HTTP and HTTPS client tests added
in a follow-up commit.

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
Add the build, fixtures, and local HTTP and TLS server support needed to
exercise a test loader.

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
Cover response framing, failures, redirects, timeouts, and TLS behavior.

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
Add HTTP client documentation and further work.

Signed-off-by: Aryan Arora <aryanarora.w1@gmail.com>
@aryanA101a
aryanA101a requested a review from bsdimp as a code owner September 6, 2026 06:43
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Thank you for taking the time to contribute to FreeBSD!

Some of files have special handling:

Warning

contrib: Contributed software usually managed by vendor branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants