Skip to content

Commit 761ba13

Browse files
committed
Updates after rebase
1 parent 1325dbc commit 761ba13

File tree

8 files changed

+116
-65
lines changed

8 files changed

+116
-65
lines changed
28.4 MB
Binary file not shown.

.github/workflows/bind9.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
pkg-config make libidn2-dev libuv1-dev libnghttp2-dev libcap-dev \
8989
libjemalloc-dev zlib1g-dev libxml2-dev libjson-c-dev libcmocka-dev \
9090
python3-pytest python3-dnspython python3-hypothesis patch iproute2 \
91-
net-tools
91+
net-tools git
9292
PERL_MM_USE_DEFAULT=1 cpan -i Net::DNS
9393
9494
- name: Checkout bind9

.github/workflows/build-wolfprovider.yml

Lines changed: 34 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -98,61 +98,43 @@ jobs:
9898
git remote add upstream https://github.com/wolfSSL/wolfProvider.git || true
9999
git fetch upstream --tags --no-recurse-submodules
100100
101-
# Cache wolfSSL to speed up builds:
102-
# - Git repository cache: Avoids re-cloning wolfSSL repo
103-
# - Complete build cache: Includes source, built packages, and artifacts
104-
# Cache keys include script hash to invalidate when install script changes
105-
- name: Cache wolfSSL git repository
106-
uses: actions/cache@v4
107-
with:
108-
path: /tmp/wolfssl-pkg/wolfssl/.git
109-
key: wolfssl-git-${{ env.wolfssl_ref }}-${{ hashFiles('wolfProvider/debian/install-wolfssl.sh') }}-${{ github.sha }}
110-
restore-keys: |
111-
wolfssl-git-${{ env.wolfssl_ref }}-${{ hashFiles('wolfProvider/debian/install-wolfssl.sh') }}-
112-
wolfssl-git-${{ env.wolfssl_ref }}-
113-
114-
- name: Cache wolfSSL source and build
115-
uses: actions/cache@v4
116-
with:
117-
path: |
118-
${{ env.WOLFSSL_PACKAGES_PATH }}/wolfssl
119-
${{ env.WOLFSSL_PACKAGES_PATH }}/*.deb
120-
${{ env.WOLFSSL_PACKAGES_PATH }}/*.dsc
121-
${{ env.WOLFSSL_PACKAGES_PATH }}/*.tar.gz
122-
key: wolfssl-complete-${{ env.wolfssl_ref }}-${{ hashFiles('wolfProvider/debian/install-wolfssl.sh') }}-${{ github.sha }}
123-
restore-keys: |
124-
wolfssl-complete-${{ env.wolfssl_ref }}-${{ hashFiles('wolfProvider/debian/install-wolfssl.sh') }}-
125-
126-
- name: Install wolfssl debian package
127-
run: |
128-
mkdir -p "/tmp/wolfssl-pkg"
129-
cd "/tmp/wolfssl-pkg"
130-
131-
# Check if cached packages exist
132-
if ls *.deb 1> /dev/null 2>&1; then
133-
echo "Found cached wolfSSL packages, installing them..."
134-
dpkg -i *.deb || apt-get install -f -y
135-
else
136-
echo "No cached packages found, building from source..."
137-
# Install wolfssl packages with specified version
138-
chmod +x $GITHUB_WORKSPACE/debian/install-wolfssl.sh
139-
if [ "$wolfssl_ref" != "master" ]; then
140-
$GITHUB_WORKSPACE/debian/install-wolfssl.sh --tag "$WOLFSSL_VERSION" "/tmp/wolfssl-pkg"
141-
else
142-
$GITHUB_WORKSPACE/debian/install-wolfssl.sh "/tmp/wolfssl-pkg"
143-
fi
144-
fi
145-
146-
- name: Install wolfSSL packages from cache
101+
# - name: Restore wolfSSL packages
102+
# uses: actions/cache@v4
103+
# id: wolfssl_cache
104+
# with:
105+
# path: |
106+
# ${{ env.WOLFSSL_PACKAGES_PATH }}/*.deb
107+
# ${{ env.WOLFSSL_PACKAGES_PATH }}/*.dsc
108+
# ${{ env.WOLFSSL_PACKAGES_PATH }}/*.tar.gz
109+
# key: wolfssl-debian-packages-${{ inputs.wolfssl_ref }}
110+
111+
# - name: Install wolfSSL packages from cache
112+
# if: steps.wolfssl_cache.outputs.cache-hit == 'true'
113+
# run: |
114+
# printf "Installing wolfSSL packages from cache:\n"
115+
# ls -la ${{ env.WOLFSSL_PACKAGES_PATH }}
116+
# apt install --reinstall -y ${{ env.WOLFSSL_PACKAGES_PATH }}/*wolfssl*.deb
117+
118+
# # TODO: roll this step into utils-wolfssl.sh
119+
# # TODO: specify tag below
120+
# - name: Build wolfSSL packages and install
121+
# # if: steps.wolfssl_cache.outputs.cache-hit != 'true'
122+
# run: |
123+
# # $GITHUB_WORKSPACE/debian/install-wolfssl.sh --tag ${{ inputs.wolfssl_ref }} ${{ env.WOLFSSL_PACKAGES_PATH }}
124+
# $GITHUB_WORKSPACE/debian/install-wolfssl.sh ${{ env.WOLFSSL_PACKAGES_PATH }}
125+
126+
# Unpack and install wolfSSL packages
127+
- name: Unpack and install wolfSSL packages
147128
run: |
148-
printf "Installing wolfSSL packages:\n"
149-
ls -la ${{ env.WOLFSSL_PACKAGES_PATH }}
150-
apt install --reinstall -y ${{ env.WOLFSSL_PACKAGES_PATH }}/*wolfssl*.deb
151-
129+
mkdir -p ${{ env.WOLFSSL_PACKAGES_PATH }}
130+
tar -xzf .github/packages/debian-wolfssl.tar.gz -C ${{ env.WOLFSSL_PACKAGES_PATH }}
131+
mv ${{ env.WOLFSSL_PACKAGES_PATH }}/debian-packages/* ${{ env.WOLFSSL_PACKAGES_PATH }}
132+
apt install -y ${{ env.WOLFSSL_PACKAGES_PATH }}/*.deb
133+
152134
# Check for cached OpenSSL packages
153135
- name: Checking OpenSSL packages in cache
154136
uses: actions/cache@v4
155-
id: openssl-cache
137+
id: openssl_cache
156138
continue-on-error: true
157139
with:
158140
path: |
@@ -162,7 +144,7 @@ jobs:
162144

163145
# Install OpenSSL packages from cache if available
164146
- name: Install OpenSSL packages from cache
165-
if: steps.openssl-cache.outputs.cache-hit == 'true'
147+
if: steps.openssl_cache.outputs.cache-hit == 'true'
166148
run: |
167149
printf "Installing OpenSSL packages from cache:\n"
168150
ls -la ${{ env.OPENSSL_PACKAGES_PATH }}

.github/workflows/cjose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ jobs:
8888
apt install --reinstall -y \
8989
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb
9090
91+
92+
93+
- name: Check wolfProvider is installed
94+
run: |
95+
openssl list -providers
96+
openssl list -providers | grep -q "wolfSSL Provider" || (echo "ERROR: libwolfprov not found in OpenSSL providers" && exit 1)
97+
9198
- name: Download cjose
9299
uses: actions/checkout@v4
93100
with:

.github/workflows/stunnel.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ jobs:
125125
run: |
126126
python3 -m venv myenv
127127
source myenv/bin/activate
128-
pip install cryptography # will use your OpenSSL if built from source
129128
130129
- name: Apply patch to disable pkcs12 test
131130
if : ${{ matrix.stunnel_ref == 'master' }}

.github/workflows/systemd.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
pkgconf zlib1g-dev libgcrypt20-dev libgpg-error-dev libgnutls28-dev \
9292
libp11-kit-dev libfido2-dev libtss2-dev libdw-dev libbz2-dev \
9393
liblzma-dev liblz4-dev libzstd-dev libxkbcommon-dev libglib2.0-dev \
94-
libdbus-1-dev python3-setuptools python3-wheel
94+
libdbus-1-dev python3-setuptools python3-wheel git
9595
9696
- name: Checkout systemd
9797
uses: actions/checkout@v4
@@ -125,4 +125,8 @@ jobs:
125125
export ${{ matrix.force_fail }}
126126
meson test -C build $TEST_CASES
127127
TEST_RESULT=$?
128+
if [ $TEST_RESULT -ne 0 ]; then
129+
cat build/meson-logs/testlog.txt
130+
fi
131+
128132
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} systemd

debian/control

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ Build-Depends:
99
devscripts,
1010
dh-exec,
1111
git,
12-
pkgconf,
13-
libwolfssl-dev
12+
pkgconf
1413

1514
Package: libwolfprov
1615
Architecture: any

debian/install-wolfssl.sh

Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ install_wolfssl_from_git() {
2121
local work_dir="$1"
2222
local git_tag="$2"
2323
local debug_mode="$3"
24+
local reinstall_mode="$4"
2425

2526
# If no working directory specified, create one using mktemp
2627
if [ -z "$work_dir" ]; then
@@ -114,6 +115,12 @@ AC_CONFIG_FILES([debian/rules],[chmod +x debian/rules])' configure.ac
114115
else
115116
echo "configure.ac already contains required patches"
116117
fi
118+
119+
# Patch debian/rules.in to disable dh_strip
120+
echo "Patching debian/rules.in to disable dh_strip..."
121+
sed -i 's/^[[:space:]]*dh_strip.*/:/' debian/rules.in
122+
echo "debian/rules.in patched successfully"
123+
117124
else
118125
echo "debian/rules.in found, using existing debian packaging"
119126
fi
@@ -130,22 +137,63 @@ AC_CONFIG_FILES([debian/rules],[chmod +x debian/rules])' configure.ac
130137

131138
# Configure with the specified options
132139
echo "Configuring wolfSSL with specified options..."
133-
configure_opts="--enable-opensslcoexist --enable-cmac --with-eccminsz=192 --enable-ed25519 --enable-ed448 --enable-md5 --enable-curve25519 --enable-curve448 --enable-aesccm --enable-aesxts --enable-aescfb --enable-keygen --enable-shake128 --enable-shake256 --enable-wolfprovider --enable-rsapss --enable-scrypt"
140+
configure_opts="--enable-opensslcoexist \
141+
--enable-cmac \
142+
--with-eccminsz=192 \
143+
--enable-ed25519 \
144+
--enable-ed448 \
145+
--enable-md5 \
146+
--enable-curve25519 \
147+
--enable-curve448 \
148+
--enable-aesccm \
149+
--enable-aesxts \
150+
--enable-aescfb \
151+
--enable-keygen \
152+
--enable-shake128 \
153+
--enable-shake256 \
154+
--enable-wolfprovider \
155+
--enable-rsapss \
156+
--enable-scrypt"
134157

135158
if [ "$debug_mode" = "true" ]; then
136159
configure_opts="$configure_opts --enable-debug"
137160
echo "Debug mode enabled"
138161
fi
139162

140-
./configure $configure_opts CFLAGS="-DWOLFSSL_OLD_OID_SUM -DWOLFSSL_PUBLIC_ASN -DHAVE_FFDHE_3072 -DHAVE_FFDHE_4096 -DWOLFSSL_DH_EXTRA -DWOLFSSL_PSS_SALT_LEN_DISCOVER -DWOLFSSL_PUBLIC_MP -DWOLFSSL_RSA_KEY_CHECK -DHAVE_FFDHE_Q -DHAVE_FFDHE_6144 -DHAVE_FFDHE_8192 -DWOLFSSL_ECDSA_DETERMINISTIC_K -DWOLFSSL_VALIDATE_ECC_IMPORT -DRSA_MIN_SIZE=1024 -DHAVE_AES_ECB -DWC_RSA_DIRECT -DWC_RSA_NO_PADDING -DACVP_VECTOR_TESTING -DWOLFSSL_ECDSA_SET_K" LIBS="-lm"
163+
./configure $configure_opts \
164+
CFLAGS="-DWOLFSSL_OLD_OID_SUM \
165+
-DWOLFSSL_PUBLIC_ASN \
166+
-DHAVE_FFDHE_3072 \
167+
-DHAVE_FFDHE_4096 \
168+
-DWOLFSSL_DH_EXTRA \
169+
-DWOLFSSL_PSS_SALT_LEN_DISCOVER \
170+
-DWOLFSSL_PUBLIC_MP \
171+
-DWOLFSSL_RSA_KEY_CHECK \
172+
-DHAVE_FFDHE_Q \
173+
-DHAVE_FFDHE_6144 \
174+
-DHAVE_FFDHE_8192 \
175+
-DWOLFSSL_ECDSA_DETERMINISTIC_K \
176+
-DWOLFSSL_VALIDATE_ECC_IMPORT \
177+
-DRSA_MIN_SIZE=1024 \
178+
-DHAVE_AES_ECB \
179+
-DWC_RSA_DIRECT \
180+
-DWC_RSA_NO_PADDING \
181+
-DACVP_VECTOR_TESTING \
182+
-DWOLFSSL_ECDSA_SET_K" \
183+
LIBS="-lm"
141184

142185
# Build Debian packages
143186
echo "Building Debian packages..."
144187
make deb
145188

146189
# Install the generated packages
147190
echo "Installing generated .deb packages..."
148-
dpkg -i ../*.deb
191+
if [ "$reinstall_mode" = "true" ]; then
192+
echo "Reinstall mode: forcing package reinstallation..."
193+
dpkg -i --force-overwrite --force-confnew ../*.deb
194+
else
195+
dpkg -i ../*.deb
196+
fi
149197

150198
echo "WolfSSL installation from git completed successfully"
151199
}
@@ -155,6 +203,7 @@ main() {
155203
local work_dir=""
156204
local git_tag=""
157205
local debug_mode="false"
206+
local reinstall_mode="false"
158207

159208
# Parse command line arguments
160209
while [[ $# -gt 0 ]]; do
@@ -166,6 +215,7 @@ main() {
166215
echo "Options:"
167216
echo " -t, --tag TAG Clone and build specific tag or branch (default: master)"
168217
echo " -d, --debug Enable debug build mode (adds --enable-debug)"
218+
echo " -r, --reinstall Force reinstall even if packages are already installed"
169219
echo " -h, --help Show this help message"
170220
echo ""
171221
echo "Arguments:"
@@ -178,6 +228,7 @@ main() {
178228
echo " $0 --tag v5.6.4 /tmp/build # Build tag v5.6.4 in /tmp/build"
179229
echo " $0 --debug # Build master with debug enabled"
180230
echo " $0 --debug --tag v5.6.4 # Build tag v5.6.4 with debug enabled"
231+
echo " $0 --reinstall # Force reinstall even if packages exist"
181232
exit 0
182233
;;
183234
-t|--tag)
@@ -188,6 +239,10 @@ main() {
188239
debug_mode="true"
189240
shift
190241
;;
242+
-r|--reinstall)
243+
reinstall_mode="true"
244+
shift
245+
;;
191246
-*)
192247
echo "Unknown option: $1" >&2
193248
echo "Use --help for usage information" >&2
@@ -206,10 +261,15 @@ main() {
206261
esac
207262
done
208263

209-
echo "Checking if wolfSSL packages are already installed..."
210-
if check_packages_installed; then
211-
echo "Packages already installed, exiting successfully"
212-
exit 0
264+
# Only check if packages are installed if not in reinstall mode
265+
if [ "$reinstall_mode" = "false" ]; then
266+
echo "Checking if wolfSSL packages are already installed..."
267+
if check_packages_installed; then
268+
echo "Packages already installed, exiting successfully"
269+
exit 0
270+
fi
271+
else
272+
echo "Reinstall mode enabled, bypassing package check..."
213273
fi
214274

215275
echo "Installing wolfSSL packages from git repository..."
@@ -219,7 +279,7 @@ main() {
219279
echo "Building wolfSSL master branch"
220280
fi
221281

222-
install_wolfssl_from_git "$work_dir" "$git_tag" "$debug_mode"
282+
install_wolfssl_from_git "$work_dir" "$git_tag" "$debug_mode" "$reinstall_mode"
223283

224284
echo "WolfSSL installation completed successfully"
225285
}

0 commit comments

Comments
 (0)