[PATCH 1/1] Let options.h be the first wolfSSL include

19 views
Skip to first unread message

Bastian Germann

unread,
Jun 21, 2024, 2:15:15 PM (12 days ago) Jun 21
to swup...@googlegroups.com, Bastian Germann
cbceee179d (Fix build error when WolfSSL is used) included
wolfssl/ssl.h in front of wolfssl/options.h, which has to be the first
wolfSSL include. The compilation will error on the X509 type with this.

Change the include order.
---
include/sslapi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/sslapi.h b/include/sslapi.h
index 64640184..36762b93 100644
--- a/include/sslapi.h
+++ b/include/sslapi.h
@@ -41,8 +41,8 @@
#include <openssl/opensslv.h>
#include <openssl/cms.h>
#elif defined(CONFIG_SSL_IMPL_WOLFSSL)
-#include <wolfssl/ssl.h>
#include <wolfssl/options.h>
+#include <wolfssl/ssl.h>
#include <wolfssl/openssl/bio.h>
#include <wolfssl/openssl/objects.h>
#include <wolfssl/openssl/err.h>
--
2.45.2

Bastian Germann

unread,
Jun 21, 2024, 2:15:15 PM (12 days ago) Jun 21
to swup...@googlegroups.com, Bastian Germann
I cannot think of a configuration where cbceee179d (Fix build error when
WolfSSL is used) would be needed. Please consider reverting. Otherwise
please apply this patch.

Bastian Germann (1):
Let options.h be the first wolfSSL include

include/sslapi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--
2.45.2

Stefano Babic

unread,
Jun 25, 2024, 5:10:56 AM (9 days ago) Jun 25
to Bastian Germann, swup...@googlegroups.com
On 21.06.24 20:15, Bastian Germann wrote:
> I cannot think of a configuration where cbceee179d (Fix build error when
> WolfSSL is used) would be needed. Please consider reverting. Otherwise
> please apply this patch.

I cannot build due to missing define - by reverting:


CC core/swupdate.o
In file included from include/sslapi.h:44,
from core/swupdate.c:43:
/usr/include/wolfssl/ssl.h:2195:5: error: expected identifier before
numeric constant
2195 | BIO_CLOSE = 1,
| ^~~~~~~~~

Note: there also a bunch of warnbings, and I will fix them when I will
rework the crypto modules in SWUpdate, so they are ok for now.

Best regards,
Stefano

--
Reply all
Reply to author
Forward
0 new messages