Skip to content

Commit 1757f10

Browse files
committed
Wolfprovider: enable replace-default builds and other cleanup
1 parent 1c59392 commit 1757f10

File tree

4 files changed

+36
-5
lines changed

4 files changed

+36
-5
lines changed

conf/layer.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
101101
# Uncomment if building OpenSSH with wolfSSL.
102102
#BBFILES += "${LAYERDIR}/recipes-connectivity/openssh/*.bbappend"
103103

104+
# Uncomment if building OpenSSL with wolfProvider.
105+
BBFILES += "${LAYERDIR}/recipes-connectivity/openssl/*.bbappend"
106+
104107
# Uncomment if building rsyslog with wolfSSL.
105108
#BBFILES += "${LAYERDIR}/recipes-extended/rsyslog/*.bbappend"
106109

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
# Apply wolfProvider metadata to the OpenSSL version
3+
do_configure:prepend() {
4+
echo "Injecting BUILD_METADATA into VERSION.dat"
5+
sed -i 's/BUILD_METADATA=.*/BUILD_METADATA=wolfProvider/g' ${S}/VERSION.dat
6+
if echo "${IMAGE_FEATURES}" | grep -qw "fips"; then
7+
sed -i 's/BUILD_METADATA=.*/BUILD_METADATA=wolfProvider-fips/g' ${S}/VERSION.dat
8+
fi
9+
sed -i "s/RELEASE_DATE=.*/RELEASE_DATE=$(date --iso-8601=minutes)/g" ${OPENSSL_SOURCE_DIR}/VERSION.dat
10+
}
11+
12+
# This patched version of openssl requires that libwolfprov is also in the build
13+
# Target-only; do not affect -native or -nativesdk
14+
RDEPENDS:libcrypto3:append:class-target = " libwolfprov"
15+
16+
# Apply the replace-default patch
17+
SRC_URI:append = " \
18+
git://github.com/wolfSSL/wolfProvider.git;protocol=https;nobranch=1;rev=v1.1.0;destsuffix=git/wolfProvider \
19+
"
20+
21+
python do_patch:append() {
22+
import subprocess
23+
bb.note("Applying wolfProvider patch (Python form)")
24+
subprocess.run(
25+
["patch", "-d", d.getVar("S"), "-p1",
26+
"-i", f"{d.getVar('WORKDIR')}/git/wolfProvider/patches/openssl3-replace-default.patch"],
27+
check=True)
28+
}

recipes-wolfssl/wolfprovider/wolfprovider_1.0.2.bb renamed to recipes-wolfssl/wolfprovider/wolfprovider_1.1.0.bb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
SUMMARY = "wolfProvider is a Proivder designed for Openssl 3.X.X"
2-
DESCRIPTION = "wolfProvider is a library that can be used as an Provider in OpenSSL"
1+
SUMMARY = "wolfProvider is a Provider designed for Openssl 3.X.X"
2+
DESCRIPTION = "wolfProvider is a crypto backend interface for use as an OpenSSL Provider"
33
HOMEPAGE = "https://github.com/wolfSSL/wolfProvider"
44
BUGTRACKER = "https://github.com/wolfSSL/wolfProvider/issues"
55
SECTION = "libs"
@@ -10,7 +10,7 @@ DEPENDS += "util-linux-native"
1010
PROVIDES += "wolfprovider"
1111
RPROVIDES_${PN} = "wolfprovider"
1212

13-
SRC_URI = "git://github.com/wolfssl/wolfProvider.git;nobranch=1;protocol=https;rev=22f358498eadb4f91b2ce8d23045dafec6bcbb38"
13+
SRC_URI = "git://github.com/wolfssl/wolfProvider.git;nobranch=1;protocol=https;rev=v1.1.0"
1414

1515
DEPENDS += " wolfssl \
1616
openssl \
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
EXTRA_OECONF += " --enable-opensslcoexist --enable-cmac --enable-keygen --enable-sha --enable-des3 --enable-aesctr --enable-aesccm --enable-x963kdf --enable-compkey --enable-certgen --enable-aeskeywrap --enable-enckeys --enable-base16 "
2-
CPPFLAGS += " -DHAVE_AES_ECB -DWOLFSSL_AES_DIRECT -DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DECC_MIN_KEY_SZ=192 -DHAVE_PUBLIC_FFDHE -DWOLFSSL_DH_EXTRA -DRSA_MIN_SIZE=1024"
3-
CPPFLAGS += " ${@'-DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER' if d.getVar('WOLFSSL_TYPE') not in ("fips", "fips-ready") else ''}"
2+
CFLAGS += " -DHAVE_AES_ECB -DWOLFSSL_AES_DIRECT -DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DECC_MIN_KEY_SZ=192 -DHAVE_PUBLIC_FFDHE -DWOLFSSL_DH_EXTRA -DRSA_MIN_SIZE=1024"
3+
CFLAGS += " ${@'-DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER' if d.getVar('WOLFSSL_TYPE') not in ("fips", "fips-ready") else ''}"

0 commit comments

Comments
 (0)