Skip to content

net: lwip: root certificates

Jerome Forissier u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 17 repliesIn review
  2. v15 patches 24 repliesSuperseded

Changes in v2 from the cover letter

- Drop PEM support. It is unnecessary since conversion from PEM to DER is easy, and PEM takes more space in memory. Another reason is the ugly hack requiring to allocate one more byte for the null terminator in case the file is PEM (therefore, text).
- Add 'wget cacert none|optional|required'
- Replace '#if defined CONFIG_X' with '#if CONFIG_IS_ENABLED(X)' in net/lwip/wget.c Do NOT replace '#if defined(CONFIG_X)' in net/net-lwip.c for consistency with how other symbols are treated in that file.
- Make builtin_cacert const
- Make cacert_size static
- BUILTIN_CACERT selects BUILD_BIN2C
- Add documentation in doc/cmd/wget.rst
- Apply review tags

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: lwip: extend wget to support CA (root) certificatescmd/Kconfig cmd/net-lwip.c net/lwip/wget.c+121 -67 replies
2/6lwip: tls: enforce checking of server certificates based on CA availabilitylib/lwip/lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c lib/lwip/lwip/src/include/lwip/apps/altcp_tls_mbedtls_opts.h+2 -70 replies
3/6lwip: tls: warn when no CA exists amd log certificate validation errorslib/lwip/lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c+6 -00 replies
4/6net: lwip: add support for built-in root certificatescmd/Kconfig cmd/net-lwip.c net/lwip/Makefile +1 more+72 -99 replies
5/6doc: cmd: wget: document cacert subcommanddoc/usage/cmd/wget.rst+80 -21 reply
6/6configs: qemu_arm64_lwip_defconfig: enable WGET_CACERTconfigs/qemu_arm64_lwip_defconfig+1 -00 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchIlias Apalodimas
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6A-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] net: lwip: root certificates

This series adds support for HTTP server authentication using root (CA) certificates.

As a first step, the wget command is extended to support a sub-command:
cacert <addr> <size>. The memory region shall contain the CA certificates. With this, it is possible to load the certificates from storage or get them from the network for example, which is convenient for testing at least. The Kconfig symbol for this feature is WGET_CACERT=y.

Then new Kconfig symbols are added to support providing the certificates at build time as a DER encoded X509 collection: WGET_BUILTIN_CACERT=y and WGET_BUILTIN_CACERT_PATH=<some path>.

An example of how to use this feature is given in patch "doc: cmd: wget:
document cacert subcommand".

Changes in v2:
- Drop PEM support. It is unnecessary since conversion from PEM to DER is easy, and PEM takes more space in memory. Another reason is the ugly hack requiring to allocate one more byte for the null terminator in case the file is PEM (therefore, text).
- Add 'wget cacert none|optional|required'
- Replace '#if defined CONFIG_X' with '#if CONFIG_IS_ENABLED(X)' in net/lwip/wget.c Do NOT replace '#if defined(CONFIG_X)' in net/net-lwip.c for consistency with how other symbols are treated in that file.
- Make builtin_cacert const
- Make cacert_size static
- BUILTIN_CACERT selects BUILD_BIN2C
- Add documentation in doc/cmd/wget.rst
- Apply review tags

Jerome Forissier (6):
net: lwip: extend wget to support CA (root) certificates
lwip: tls: enforce checking of server certificates based on CA
availability
lwip: tls: warn when no CA exists amd log certificate validation
errors
net: lwip: add support for built-in root certificates
doc: cmd: wget: document cacert subcommand
configs: qemu_arm64_lwip_defconfig: enable WGET_CACERT

 cmd/Kconfig                                   |  22 +++
 cmd/net-lwip.c                                |  21 ++-
 configs/qemu_arm64_lwip_defconfig             |   1 +
 doc/usage/cmd/wget.rst                        |  82 +++++++++-
 .../src/apps/altcp_tls/altcp_tls_mbedtls.c    |   9 +-
 .../lwip/apps/altcp_tls_mbedtls_opts.h        |   6 -
 net/lwip/Makefile                             |   6 +
 net/lwip/wget.c                               | 141 +++++++++++++++++-
 8 files changed, 273 insertions(+), 15 deletions(-)
Signature · 1 line
2.43.0