Message ID | 20221007165028.21365-2-bage@debian.org |
---|---|
State | Accepted |
Headers | show |
Series | mongoose: Fix build with wolfSSL | expand |
On Fri, Oct 7, 2022 at 12:50 PM Bastian Germann <bage@debian.org> wrote: > > Fixes: 0c5b7d2160 ("mongoose: updated to 6.18") > Signed-off-by: Bastian Germann <bage@debian.org> > --- > mongoose/mongoose.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/mongoose/mongoose.h b/mongoose/mongoose.h > index 332830e..bed23ca 100644 > --- a/mongoose/mongoose.h > +++ b/mongoose/mongoose.h Modifications to mongoose.c/mongoose.h should be sent upstream to: https://github.com/cesanta/mongoose > @@ -1224,8 +1224,13 @@ struct mg_tls { > > #if MG_ENABLE_OPENSSL > > +#ifdef CONFIG_SSL_IMPL_WOLFSSL > +#include <wolfssl/openssl/err.h> > +#include <wolfssl/openssl/ssl.h> This could go here instead maybe? https://github.com/sbabic/swupdate/blob/c8341e29b2dea2ebf08fcb0b771d4e416ab8018a/mongoose/mongoose_interface.c#L31 > +#else > #include <openssl/err.h> > #include <openssl/ssl.h> > +#endif > > struct mg_tls { > SSL_CTX *ctx; > -- > 2.37.2 > > -- > 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+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/swupdate/20221007165028.21365-2-bage%40debian.org.
Hi Bastian, On 07.10.22 18:50, Bastian Germann wrote: > Fixes: 0c5b7d2160 ("mongoose: updated to 6.18") But mongoose was updated with ce8702ce7e to 7.8 - see on -master. > Signed-off-by: Bastian Germann <bage@debian.org> > --- > mongoose/mongoose.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/mongoose/mongoose.h b/mongoose/mongoose.h > index 332830e..bed23ca 100644 > --- a/mongoose/mongoose.h > +++ b/mongoose/mongoose.h > @@ -1224,8 +1224,13 @@ struct mg_tls { > > #if MG_ENABLE_OPENSSL > > +#ifdef CONFIG_SSL_IMPL_WOLFSSL > +#include <wolfssl/openssl/err.h> > +#include <wolfssl/openssl/ssl.h> > +#else > #include <openssl/err.h> > #include <openssl/ssl.h> > +#endif > > struct mg_tls { > SSL_CTX *ctx; Best regards, Stefano
Am 10.10.22 um 10:15 schrieb Stefano Babic: > Hi Bastian, > > On 07.10.22 18:50, Bastian Germann wrote: >> Fixes: 0c5b7d2160 ("mongoose: updated to 6.18") > > But mongoose was updated with ce8702ce7e to 7.8 - see on -master. I know. But still this one fixes that commit since the thing was broken since then. The 2/2 patch has a fix for the update. >> Signed-off-by: Bastian Germann <bage@debian.org> >> --- >> mongoose/mongoose.h | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/mongoose/mongoose.h b/mongoose/mongoose.h >> index 332830e..bed23ca 100644 >> --- a/mongoose/mongoose.h >> +++ b/mongoose/mongoose.h >> @@ -1224,8 +1224,13 @@ struct mg_tls { >> #if MG_ENABLE_OPENSSL >> +#ifdef CONFIG_SSL_IMPL_WOLFSSL >> +#include <wolfssl/openssl/err.h> >> +#include <wolfssl/openssl/ssl.h> >> +#else >> #include <openssl/err.h> >> #include <openssl/ssl.h> >> +#endif >> struct mg_tls { >> SSL_CTX *ctx; > > Best regards, > Stefano >
On 10.10.22 06:49, James Hilliard wrote: > On Fri, Oct 7, 2022 at 12:50 PM Bastian Germann <bage@debian.org> wrote: >> >> Fixes: 0c5b7d2160 ("mongoose: updated to 6.18") >> Signed-off-by: Bastian Germann <bage@debian.org> >> --- >> mongoose/mongoose.h | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/mongoose/mongoose.h b/mongoose/mongoose.h >> index 332830e..bed23ca 100644 >> --- a/mongoose/mongoose.h >> +++ b/mongoose/mongoose.h > > Modifications to mongoose.c/mongoose.h should be sent upstream to: > https://github.com/cesanta/mongoose This is of course the preferred way, so we have not to patch again ourselves when a new Mongoose's version is released. Anyway, I am not against to merge this in SWUpdate until it flows to mongoose's mainline. > >> @@ -1224,8 +1224,13 @@ struct mg_tls { >> >> #if MG_ENABLE_OPENSSL >> >> +#ifdef CONFIG_SSL_IMPL_WOLFSSL >> +#include <wolfssl/openssl/err.h> >> +#include <wolfssl/openssl/ssl.h> > > This could go here instead maybe? > https://github.com/sbabic/swupdate/blob/c8341e29b2dea2ebf08fcb0b771d4e416ab8018a/mongoose/mongoose_interface.c#L31 I guess not - mongoose.c uses just plain mongoose.h and does not include mongoose_interface (and it is correct), but then the wrong headers (from openSSL) are included instead of the ones from Wolfssl. Best regards, Stefano > >> +#else >> #include <openssl/err.h> >> #include <openssl/ssl.h> >> +#endif >> >> struct mg_tls { >> SSL_CTX *ctx; >> -- >> 2.37.2 >> >> -- >> 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+unsubscribe@googlegroups.com. >> To view this discussion on the web visit https://groups.google.com/d/msgid/swupdate/20221007165028.21365-2-bage%40debian.org. >
diff --git a/mongoose/mongoose.h b/mongoose/mongoose.h index 332830e..bed23ca 100644 --- a/mongoose/mongoose.h +++ b/mongoose/mongoose.h @@ -1224,8 +1224,13 @@ struct mg_tls { #if MG_ENABLE_OPENSSL +#ifdef CONFIG_SSL_IMPL_WOLFSSL +#include <wolfssl/openssl/err.h> +#include <wolfssl/openssl/ssl.h> +#else #include <openssl/err.h> #include <openssl/ssl.h> +#endif struct mg_tls { SSL_CTX *ctx;
Fixes: 0c5b7d2160 ("mongoose: updated to 6.18") Signed-off-by: Bastian Germann <bage@debian.org> --- mongoose/mongoose.h | 5 +++++ 1 file changed, 5 insertions(+)