Skip to content

Conversation

jetm
Copy link

@jetm jetm commented Sep 19, 2024

While adding https:// support to U-Boot, several issues were found while using http client app from lwip with SSL support from mbedtls. Further details are in the commit messages.

trini pushed a commit to trini/u-boot that referenced this pull request Nov 13, 2024
The current code support mbedTLS 2.28. Since we are using a newer
version in U-Boot, update the necessary accessors and the lwIP codebase
to work with mbedTLS 3.6.0. It's worth noting that the patches are
already sent to lwIP [0]

While at it enable LWIP_ALTCP_TLS and enable TLS support in lwIP

[0] lwip-tcpip/lwip#47

Signed-off-by: Javier Tia <[email protected]>
Acked-by: Jerome Forissier <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
trini pushed a commit to trini/u-boot that referenced this pull request Nov 13, 2024
SNI, or Server Name Indication, is an addition to the TLS encryption
protocol that enables a client device to specify the domain name it is
trying to reach in the first step of the TLS handshake, preventing
common name mismatch errors and not reaching to HTTPS server that
enforce this condition. Since most of the websites require it nowadays
add support for it.

It's worth noting that this is already sent to lwIP [0]

[0] lwip-tcpip/lwip#47

Signed-off-by: Javier Tia <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
marceloalcocer added a commit to marceloalcocer/lwip that referenced this pull request Nov 20, 2024
This is a known missing feature;

* [lwip-tcpip#47][gh-lwip-pr]
* [lwip-tcpip/lwip@c53c9d020][gh-lwip-commit]

Added here again for compatibility with [pico-sdk][gh-pico] v1.5.x.
See discussion in [marceloalcocer/picohttps#1][gh-issue] for more
details.

[gh-lwip-pr]: lwip-tcpip#47
[gh-lwip-commit] lwip-tcpip@c53c9d0
[gh-pico]: https://github.com/raspberrypi/pico-sdk
[gh-issue]: marceloalcocer/picohttps#1 (comment)
Copy link
Member

@goldsimon goldsimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Javier,
please see the 3 review comments.
Regards, Simon

@jetm jetm force-pushed the u-boot_mbedtls-3.6 branch from c53c9d0 to a540399 Compare April 8, 2025 20:53
jetm added 2 commits April 8, 2025 15:57
When using the http-client LWIP app in U-Boot (OS_SYS=0), the handshake
fails because LWIP doesn't send TCP packets after it initiates.

Signed-off-by: Javier Tia <[email protected]>
SNI, or Server Name Indication, is an addition to the TLS encryption
protocol that enables a client device to specify the domain name it is
trying to reach in the first step of the TLS handshake, preventing
common name mismatch errors and not reaching to HTTPS server that
enforce this condition.

Signed-off-by: Javier Tia <[email protected]>
@jetm jetm force-pushed the u-boot_mbedtls-3.6 branch from a540399 to 10954dc Compare April 8, 2025 21:57
@jetm
Copy link
Author

jetm commented Apr 8, 2025

Hi Javier, please see the 3 review comments. Regards, Simon

Hi @goldsimon I have addressed your three comments. Please, when you have time, take a look at the new changes. Thanks.

@jetm jetm changed the title Make lwip to work on u-boot and mbedtl v3.6 Support Server Name Indication & fix handshake Apr 8, 2025
@jetm jetm requested a review from goldsimon April 8, 2025 23:21
ttefke pushed a commit to ttefke/bl602_iot_sdk that referenced this pull request Aug 29, 2025
The current code support mbedTLS 2.28. Since we are using a newer
version in U-Boot, update the necessary accessors and the lwIP codebase
to work with mbedTLS 3.6.0. It's worth noting that the patches are
already sent to lwIP [0]

While at it enable LWIP_ALTCP_TLS and enable TLS support in lwIP

[0] lwip-tcpip/lwip#47

Signed-off-by: Javier Tia <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
ttefke pushed a commit to ttefke/bl602_iot_sdk that referenced this pull request Sep 12, 2025
The current code support mbedTLS 2.28. Since we are using a newer
version in U-Boot, update the necessary accessors and the lwIP codebase
to work with mbedTLS 3.6.0. It's worth noting that the patches are
already sent to lwIP [0]

While at it enable LWIP_ALTCP_TLS and enable TLS support in lwIP

[0] lwip-tcpip/lwip#47

Signed-off-by: Javier Tia <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
ttefke pushed a commit to ttefke/bl602_iot_sdk that referenced this pull request Sep 12, 2025
The current code support mbedTLS 2.28. Since we are using a newer
version in U-Boot, update the necessary accessors and the lwIP codebase
to work with mbedTLS 3.6.0. It's worth noting that the patches are
already sent to lwIP [0]

While at it enable LWIP_ALTCP_TLS and enable TLS support in lwIP

[0] lwip-tcpip/lwip#47

Signed-off-by: Javier Tia <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
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