Skip to content

Commit 009a00c

Browse files
committed
nginx PQC CI: skip pre-PQC-floor wolfSSL stable (master-only until v5.9.2); fix wget TLS by setting LD_LIBRARY_PATH after nginx download
1 parent 32ff44d commit 009a00c

2 files changed

Lines changed: 39 additions & 16 deletions

File tree

.github/nginx/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ RUN OPENSSL_TAG=${OPENSSL_REF} WOLFSSL_TAG=${WOLFSSL_REF} \
3939

4040
ENV WOLFPROV_ROOT=/opt/wolfProvider
4141
ENV O=/opt/wolfProvider/openssl-install
42-
ENV LD_LIBRARY_PATH=/opt/wolfProvider/wolfprov-install/lib:/opt/wolfProvider/wolfssl-install/lib:/opt/wolfProvider/openssl-install/lib:/opt/wolfProvider/openssl-install/lib64
4342

44-
# Build nginx against the wolfProvider-backed OpenSSL.
43+
# Build nginx against the wolfProvider-backed OpenSSL. The download and build
44+
# run BEFORE LD_LIBRARY_PATH points at the wolfProvider OpenSSL: otherwise
45+
# wget's own HTTPS to nginx.org would route through wolfProvider and fail
46+
# certificate verification. nginx finds the libs at runtime via -rpath.
4547
WORKDIR /opt/wolfProvider
4648
RUN wget -q "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" \
4749
&& tar -zxf "nginx-${NGINX_VERSION}.tar.gz" && rm "nginx-${NGINX_VERSION}.tar.gz"
@@ -51,6 +53,10 @@ RUN ./configure --prefix=/opt/nginx --with-http_ssl_module \
5153
--with-ld-opt="-L${O}/lib -L${O}/lib64 -Wl,-rpath,${O}/lib -Wl,-rpath,${O}/lib64 -Wl,-rpath,/opt/wolfProvider/wolfprov-install/lib -Wl,-rpath,/opt/wolfProvider/wolfssl-install/lib" \
5254
&& make -j"$(nproc)" && make install
5355

56+
# From here on the wolfProvider-backed OpenSSL is the default for cert
57+
# generation and the runtime server.
58+
ENV LD_LIBRARY_PATH=/opt/wolfProvider/wolfprov-install/lib:/opt/wolfProvider/wolfssl-install/lib:/opt/wolfProvider/openssl-install/lib:/opt/wolfProvider/openssl-install/lib64
59+
5460
# Generate the ML-DSA CA + server certificate through wolfProvider (the oqs-demos
5561
# SIG_ALG=mldsa65 arrangement) and lay down the PQC nginx config + test page.
5662
WORKDIR /opt/nginx

.github/workflows/nginx-pqc.yml

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,37 @@ jobs:
5555
echo "Latest stable wolfSSL: $LATEST"
5656
echo "Latest OpenSSL: $OSSL"
5757
echo "openssl-tag=$OSSL" >> "$GITHUB_OUTPUT"
58-
# Only PQC-eligible wolfSSL: the latest -stable (>= v5.9.2-stable) and
59-
# master, each in normal and force-fail anti-test mode. The matrix
60-
# owns the force-fail axis; the test step hands its raw result to
61-
# check-workflow-result.sh which inverts the expectation.
62-
MATRIX=$(jq -nc --arg latest "$LATEST" '{
63-
include: [
64-
{"name":("latest stable (" + $latest + ")"),
65-
"wolfssl-ref":$latest,"force_fail":""},
66-
{"name":("latest stable (" + $latest + ") [force-fail]"),
67-
"wolfssl-ref":$latest,"force_fail":"WOLFPROV_FORCE_FAIL=1"},
68-
{"name":"master","wolfssl-ref":"master","force_fail":""},
69-
{"name":"master [force-fail]",
70-
"wolfssl-ref":"master","force_fail":"WOLFPROV_FORCE_FAIL=1"}
71-
]
58+
# PQC needs the wc_MlDsaKey_* seed/message API that lands after
59+
# v5.9.1-stable, so the floor is v5.9.2-stable. master is always
60+
# eligible; the latest -stable row is only added once it is past the
61+
# floor (i.e. v5.9.2-stable+ is released). Until then only master
62+
# runs -- a pre-floor -stable would just fail the --enable-pqc gate.
63+
PQC_FLOOR="v5.9.1-stable"
64+
if [ "$(printf '%s\n%s\n' "$PQC_FLOOR" "$LATEST" \
65+
| sort -V | tail -n1)" != "$PQC_FLOOR" ]; then
66+
LATEST_PQC_ELIGIBLE=true
67+
else
68+
LATEST_PQC_ELIGIBLE=false
69+
fi
70+
echo "latest-stable PQC eligible: $LATEST_PQC_ELIGIBLE"
71+
# Each eligible wolfSSL ref runs in normal and force-fail anti-test
72+
# mode. The matrix owns the force-fail axis; the test step hands its
73+
# raw result to check-workflow-result.sh which inverts the
74+
# expectation.
75+
MATRIX=$(jq -nc --arg latest "$LATEST" \
76+
--argjson latest_pqc "$LATEST_PQC_ELIGIBLE" '{
77+
include: (
78+
[ {"name":"master","wolfssl-ref":"master","force_fail":""},
79+
{"name":"master [force-fail]","wolfssl-ref":"master",
80+
"force_fail":"WOLFPROV_FORCE_FAIL=1"} ]
81+
+ (if $latest_pqc then
82+
[ {"name":("latest stable (" + $latest + ")"),
83+
"wolfssl-ref":$latest,"force_fail":""},
84+
{"name":("latest stable (" + $latest + ") [force-fail]"),
85+
"wolfssl-ref":$latest,
86+
"force_fail":"WOLFPROV_FORCE_FAIL=1"} ]
87+
else [] end)
88+
)
7289
}')
7390
echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT"
7491

0 commit comments

Comments
 (0)