[PATCH 0/2] mongoose: Fix build with wolfSSL

56 views
Skip to first unread message

Bastian Germann

unread,
Oct 7, 2022, 12:50:32 PM10/7/22
to swup...@googlegroups.com, Bastian Germann
mongoose built with wolfSSL only in the release that supported wolfSSL
first. The build broke shortly after that. This series fixes the build.

Bastian Germann (2):
mongoose: Fix includes for wolfSSL build
mongoose: Compatibility macro for SSL_set1_host

mongoose/mongoose.h | 7 +++++++
1 file changed, 7 insertions(+)

--
2.37.2

Bastian Germann

unread,
Oct 7, 2022, 12:50:33 PM10/7/22
to swup...@googlegroups.com, Bastian Germann
SSL_set1_host is missing from wolfSSL's OpenSSL compatibility layer.
It was introduced with mongoose 7.8 and earlier versions relied on
X509_VERIFY_PARAM_set1_host. Use that function again for wolfSSL.

Link: https://github.com/cesanta/mongoose/commit/d65ce3b59698fbbd32222e43
Fixes: 569c1d7870 ("mongoose: Update to version 7.8")
Signed-off-by: Bastian Germann <ba...@debian.org>
---
mongoose/mongoose.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/mongoose/mongoose.h b/mongoose/mongoose.h
index bed23ca..8de25d5 100644
--- a/mongoose/mongoose.h
+++ b/mongoose/mongoose.h
@@ -1227,6 +1227,8 @@ struct mg_tls {
#ifdef CONFIG_SSL_IMPL_WOLFSSL
#include <wolfssl/openssl/err.h>
#include <wolfssl/openssl/ssl.h>
+#define SSL_set1_host(param, name_null_term) \
+ X509_VERIFY_PARAM_set1_host(SSL_get0_param(param), name_null_term, 0);
#else
#include <openssl/err.h>
#include <openssl/ssl.h>
--
2.37.2

James Hilliard

unread,
Oct 10, 2022, 12:42:39 AM10/10/22
to Bastian Germann, swup...@googlegroups.com
On Fri, Oct 7, 2022 at 12:50 PM Bastian Germann <ba...@debian.org> wrote:
>
> SSL_set1_host is missing from wolfSSL's OpenSSL compatibility layer.

Shouldn't this be fixed in wolfSSL's OpenSSL compatibility layer instead?
> --
> You received this message because you are subscribed to the Google Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to swupdate+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/swupdate/20221007165028.21365-3-bage%40debian.org.

Bastian Germann

unread,
Oct 10, 2022, 12:45:03 PM10/10/22
to James Hilliard, swup...@googlegroups.com
Am 10.10.22 um 06:42 schrieb James Hilliard:
> On Fri, Oct 7, 2022 at 12:50 PM Bastian Germann <ba...@debian.org> wrote:
>>
>> SSL_set1_host is missing from wolfSSL's OpenSSL compatibility layer.
>
> Shouldn't this be fixed in wolfSSL's OpenSSL compatibility layer instead?

I have added a feature request: https://github.com/wolfSSL/wolfssl/issues/5681

Bastian Germann

unread,
Nov 5, 2022, 4:30:43 PM11/5/22
to swup...@googlegroups.com
Am 07.10.22 um 18:50 schrieb Bastian Germann:
> mongoose built with wolfSSL only in the release that supported wolfSSL
> first. The build broke shortly after that. This series fixes the build.
>
> Bastian Germann (2):
> mongoose: Fix includes for wolfSSL build
> mongoose: Compatibility macro for SSL_set1_host

Patch 2/2 is no longer needed because WolfSSL contains SSL_set1_host with v5.5.2.

Please consider applying 1/2.

Stefano Babic

unread,
Nov 6, 2022, 5:38:44 AM11/6/22
to Bastian Germann, swup...@googlegroups.com
Applied to -master, thanks !

Best regards,
Stefano Babic
Reply all
Reply to author
Forward
0 new messages