summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2023-12-24 15:44:58 +0000
committerKhem Raj <raj.khem@gmail.com>2023-12-29 09:04:15 -0800
commitbf4d7f62840ceef1f6319f161a40c4cdc8b2338a (patch)
treebb1dab581bdcbc0d45c25c9aa735442a337089e0 /meta-networking
parentaebb88b41f3c22ba737ad570d6cf44812f8f63c7 (diff)
downloadmeta-openembedded-bf4d7f62840ceef1f6319f161a40c4cdc8b2338a.tar.gz
bearssl: Upgrade to latest
Install headers so that dependencies can use this to build against. Make `brssl` executable, fixup library soname. Drop patches which change build flags in favour of command line overrides. Add support for static build. Changes: Thomas Pornin (4): Added generic API for date range validation (with callbacks). Fixed RSA PSS verificatiobn bug (when hash_len != salt_len). Added macro that indicates presence of the time callback feature. Also added C++ compatibility. Fixed spurious warning about old-style prototype. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch57
-rw-r--r--meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch32
-rw-r--r--meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb27
3 files changed, 16 insertions, 100 deletions
diff --git a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch b/meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch
deleted file mode 100644
index 00be22499..000000000
--- a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From 4ba61c59d3488c263d106d486b656854a57ad79f Mon Sep 17 00:00:00 2001
2From: Jens Rehsack <sno@netbsd.org>
3Date: Thu, 13 Aug 2020 15:26:30 +0200
4Subject: [PATCH 1/2] conf/Unix.mk: remove fixed command definitions
5
6For cross compiling in Yocto or with appropriate SDKs, commands like
7`$CC` are reasonably predefined.
8
9Upstream-Status: Inappropriate
10
11Signed-off-by: Jens Rehsack <sno@netbsd.org>
12---
13 conf/Unix.mk | 10 +++-------
14 1 file changed, 3 insertions(+), 7 deletions(-)
15
16diff --git a/conf/Unix.mk b/conf/Unix.mk
17index 02f2b2b..05979fc 100644
18--- a/conf/Unix.mk
19+++ b/conf/Unix.mk
20@@ -37,23 +37,19 @@ RM = rm -f
21 MKDIR = mkdir -p
22
23 # C compiler and flags.
24-CC = cc
25-CFLAGS = -W -Wall -Os -fPIC
26 CCOUT = -c -o
27
28 # Static library building tool.
29-AR = ar
30 ARFLAGS = -rcs
31 AROUT =
32
33 # DLL building tool.
34-LDDLL = cc
35+LDDLL = $(CCLD)
36 LDDLLFLAGS = -shared
37 LDDLLOUT = -o
38
39 # Static linker.
40-LD = cc
41-LDFLAGS =
42+LD = $(CCLD)
43 LDOUT = -o
44
45 # C# compiler; we assume usage of Mono.
46@@ -63,7 +59,7 @@ RUNT0COMP = mono T0Comp.exe
47 # Set the values to 'no' to disable building of the corresponding element
48 # by default. Building can still be invoked with an explicit target call
49 # (e.g. 'make dll' to force build the DLL).
50-#STATICLIB = no
51+STATICLIB = no
52 #DLL = no
53 #TOOLS = no
54 #TESTS = no
55--
562.17.1
57
diff --git a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch b/meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch
deleted file mode 100644
index 3b341e035..000000000
--- a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 9515448761739d6186e7d07da5b47e368753528c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 1 Sep 2020 11:34:33 -0700
4Subject: [PATCH] make: Pass LDFLAGS when building shared objects
5
6OE passes flags like hash-style via LDFLAGS which alters the linker
7defaults, its important to have LDFLAGS in link step even if compiler
8driver is used to do linking
9
10Upstream-Status: Pending
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 mk/Rules.mk | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/mk/Rules.mk b/mk/Rules.mk
18index b480bd6..db65125 100644
19--- a/mk/Rules.mk
20+++ b/mk/Rules.mk
21@@ -344,7 +344,7 @@ $(BEARSSLLIB): $(OBJDIR) $(OBJ)
22 $(AR) $(ARFLAGS) $(AROUT)$(BEARSSLLIB) $(OBJ)
23
24 $(BEARSSLDLL): $(OBJDIR) $(OBJ)
25- $(LDDLL) $(LDDLLFLAGS) $(LDDLLOUT)$(BEARSSLDLL) $(OBJ)
26+ $(LDDLL) $(LDDLLFLAGS) $(LDFLAGS) $(LDDLLOUT)$(BEARSSLDLL) $(OBJ)
27
28 $(BRSSL): $(BEARSSLLIB) $(OBJBRSSL)
29 $(LD) $(LDFLAGS) $(LDOUT)$(BRSSL) $(OBJBRSSL) $(BEARSSLLIB)
30--
312.28.0
32
diff --git a/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb b/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb
index 777ba2270..1e70a3dec 100644
--- a/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb
+++ b/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb
@@ -24,24 +24,29 @@ LICENSE = "MIT"
24LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1fc37e1037ae673975fbcb96a98f7191" 24LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1fc37e1037ae673975fbcb96a98f7191"
25 25
26PV .= "+git${SRCPV}" 26PV .= "+git${SRCPV}"
27SRCREV = "79b1a9996c094ff593ae50bc4edc1f349f39dd6d" 27SRCREV = "79c060eea3eea1257797f15ea1608a9a9923aa6f"
28SRC_URI = "git://www.bearssl.org/git/BearSSL;protocol=https;branch=master \ 28SRC_URI = "git://www.bearssl.org/git/BearSSL;protocol=https;branch=master \
29 file://0001-conf-Unix.mk-remove-fixed-command-definitions.patch \ 29 file://0002-test-test_x509.c-fix-potential-overflow-issue.patch \
30 file://0002-test-test_x509.c-fix-potential-overflow-issue.patch \ 30 "
31 file://0001-make-Pass-LDFLAGS-when-building-shared-objects.patch \
32 "
33 31
32SONAME = "libbearssl.so.6"
34# without compile errors like 33# without compile errors like
35# <..>/ld: build/obj/ghash_pclmul.o: warning: relocation against `br_ghash_pclmul' in read-only section `.text' 34# <..>/ld: build/obj/ghash_pclmul.o: warning: relocation against `br_ghash_pclmul' in read-only section `.text'
36CFLAGS += "-fPIC" 35CFLAGS += "-fPIC"
37 36
37EXTRA_OEMAKE += 'CC="${CC}" CFLAGS="${CFLAGS}" LDDLL="${CCLD} ${LDFLAGS}" LD="${CCLD}" LDFLAGS="${LDFLAGS}" \
38 BEARSSLDLL=build/${SONAME} \
39 LDDLLFLAGS="-shared -Wl,-soname,${SONAME}" \
40 ${@ "STATICLIB=no" if d.getVar('DISABLE_STATIC') != "" else "" } \
41'
42
38S = "${WORKDIR}/git" 43S = "${WORKDIR}/git"
39B = "${S}"
40 44
41do_install() { 45do_install() {
42 mkdir -p ${D}/${bindir} ${D}/${libdir} 46 install -d ${D}/${bindir} ${D}/${libdir} ${D}/${includedir}
43 install -m 0644 ${B}/build/brssl ${D}/${bindir} 47 install -m 0755 ${B}/build/brssl ${D}/${bindir}
44 install -m 0644 ${B}/build/libbearssl.so ${D}/${libdir}/libbearssl.so.6.0.0 48 oe_libinstall -C ${B}/build libbearssl ${D}/${libdir}
45 ln -s libbearssl.so.6.0.0 ${D}/${libdir}/libbearssl.so.6 49 for inc in ${S}/inc/*.h; do
46 ln -s libbearssl.so.6.0.0 ${D}/${libdir}/libbearssl.so 50 install -m 0644 "${inc}" ${D}/${includedir}
51 done
47} 52}