Skip to content

Commit f117efb

Browse files
AdityaHPatwardhanandreilitvinandy31415pre-commit-ci[bot]
authored
Add OpenSSL 3.5 LTS to chip-build Docker image (project-chip#71586)
* Add OpenSSL 3.5 LTS to chip-build Docker image Build and install OpenSSL 3.5.0 from source into /usr/local in the chip-build base image. Ubuntu 24.04 ships OpenSSL 3.0.x which remains installed for apt dependency resolution; the 3.5 install takes precedence for pkg-config based builds (chip-cert, CHIPCryptoPALOpenSSL). OpenSSL 3.5 LTS (released April 2025, supported until October 2030) adds native ML-DSA, ML-KEM, and SLH-DSA support in the default provider, required for upcoming post-quantum cryptography (PQC) work in Matter. * Add SHA256 verification and fix CA trust for OpenSSL 3.5 Address review feedback: - Pin tarball SHA256 hash to prevent supply-chain tampering - Use --openssldir=/etc/ssl to reuse system CA trust store instead of an empty /usr/local/ssl directory - Drop install_ssldirs (no longer needed with system openssldir) * Add OpenSSL 3.5 to chip-build-minimal and chip-cert-bins images Apply the same OpenSSL 3.5 build layer to the two standalone Docker images that do not inherit from chip-build. Both install libssl-dev independently and are used for Matter builds that link against OpenSSL. * Remove dead OpenSSL 1.1.1f build from install_packages.sh This script is a CircleCI-era artifact (references clang-9, python3.8, circleci user, ~/project/ paths). Current CI uses Docker images. The OpenSSL 1.1.1f block is dead code — 1.1.1 reached EOL Sept 2023. * Bump docker file revision * Cleanup based on review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Undo request from LLM: we already use openssldir argument --------- Co-authored-by: Andrei Litvin <andreilitvin@google.com> Co-authored-by: Andrei Litvin <andy314@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 9258186 commit f117efb

6 files changed

Lines changed: 60 additions & 24 deletions

File tree

integrations/docker/images/base/chip-build-minimal/Dockerfile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,22 @@ RUN set -x \
1717
# CHIP build dependencies
1818
RUN set -x \
1919
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
20-
libssl-dev libglib2.0-dev
20+
libssl-dev \
21+
libglib2.0-dev \
22+
wget
23+
24+
# Build and install OpenSSL 3.5 LTS (post-quantum ML-DSA / ML-KEM support)
25+
ARG OPENSSL_VERSION=3.5.0
26+
ARG OPENSSL_SHA256=344d0a79f1a9b08029b0744e2cc401a43f9c90acd1044d09a530b4885a8e9fc0
27+
RUN set -x \
28+
&& cd /tmp \
29+
&& wget -q https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz \
30+
&& echo "${OPENSSL_SHA256} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c - \
31+
&& tar xzf openssl-${OPENSSL_VERSION}.tar.gz \
32+
&& cd openssl-${OPENSSL_VERSION} \
33+
&& ./Configure --prefix=/usr/local --openssldir=/etc/ssl --libdir=lib \
34+
&& make -j$(nproc) \
35+
&& make install_sw \
36+
&& ldconfig \
37+
&& cd / && rm -rf /tmp/openssl-${OPENSSL_VERSION}* \
38+
&& : # last line

integrations/docker/images/base/chip-build/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,26 @@ RUN set -x \
206206
libgirepository1.0-dev \
207207
&& rm -rf /var/lib/apt/lists/ \
208208
&& : # last line
209+
210+
# Build and install OpenSSL 3.5 LTS from source.
211+
# Ubuntu 24.04 ships OpenSSL 3.0.x via libssl-dev (kept for apt dependency
212+
# resolution). Installing 3.5 into /usr/local makes it the default for
213+
# pkg-config based builds (e.g. chip-cert, CHIPCryptoPALOpenSSL) while the
214+
# system libssl-3 continues to satisfy runtime dependencies of other
215+
# apt-installed packages.
216+
# OpenSSL 3.5 is required for native ML-DSA / ML-KEM (post-quantum) support
217+
# in the default provider (FIPS 204 / FIPS 203).
218+
ARG OPENSSL_VERSION=3.5.0
219+
ARG OPENSSL_SHA256=344d0a79f1a9b08029b0744e2cc401a43f9c90acd1044d09a530b4885a8e9fc0
220+
RUN set -x \
221+
&& cd /tmp \
222+
&& wget -q https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz \
223+
&& echo "${OPENSSL_SHA256} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c - \
224+
&& tar xzf openssl-${OPENSSL_VERSION}.tar.gz \
225+
&& cd openssl-${OPENSSL_VERSION} \
226+
&& ./Configure --prefix=/usr/local --openssldir=/etc/ssl --libdir=lib \
227+
&& make -j$(nproc) \
228+
&& make install_sw \
229+
&& ldconfig \
230+
&& cd / && rm -rf /tmp/openssl-${OPENSSL_VERSION}* \
231+
&& : # last line
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
197 : [crosscompile] Bump {armhf,aarch64} sysroot tag to `version:build-2026.05.14`
1+
198 : [chip-build] Add openssl 3.5

integrations/docker/images/chip-cert-bins/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,22 @@ RUN set -x \
123123
&& rm -rf bloaty \
124124
&& : # last line
125125

126+
# Build and install OpenSSL 3.5 LTS (post-quantum ML-DSA / ML-KEM support)
127+
ARG OPENSSL_VERSION=3.5.0
128+
ARG OPENSSL_SHA256=344d0a79f1a9b08029b0744e2cc401a43f9c90acd1044d09a530b4885a8e9fc0
129+
RUN set -x \
130+
&& cd /tmp \
131+
&& wget -q https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz \
132+
&& echo "${OPENSSL_SHA256} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c - \
133+
&& tar xzf openssl-${OPENSSL_VERSION}.tar.gz \
134+
&& cd openssl-${OPENSSL_VERSION} \
135+
&& ./Configure --prefix=/usr/local --openssldir=/etc/ssl --libdir=lib \
136+
&& make -j$(nproc) \
137+
&& make install_sw \
138+
&& ldconfig \
139+
&& cd / && rm -rf /tmp/openssl-${OPENSSL_VERSION}* \
140+
&& : # last line
141+
126142
# Stage 1.5: Bootstrap Matter.
127143
RUN echo "Cloning at commit: ${COMMITHASH}" \
128144
&& git clone https://github.com/project-chip/connectedhomeip.git /root/connectedhomeip \

scripts/setup/linux/install_packages.sh

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,3 @@ apt-get install -fy \
4343
libmbedtls-dev \
4444
python3.8-dev \
4545
python3.8-venv
46-
47-
if [[ ! -f 'ci-cache-persistent/openssl/open_ssl_1.1.1f_installed' ]]; then
48-
mkdir -p ci-cache-persistent/openssl
49-
cd ci-cache-persistent/openssl || exit
50-
wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1f.zip
51-
mkdir openssl
52-
cd openssl || exit
53-
unzip ../OpenSSL_1_1_1f.zip
54-
cd openssl-OpenSSL_1_1_1f || exit
55-
./config
56-
make
57-
58-
rm -rf ../OpenSSL_1_1_1f.zip
59-
60-
cd ~/project || exit
61-
touch ci-cache-persistent/openssl/open_ssl_1.1.1f_installed
62-
chown -R circleci:circleci build
63-
fi
64-
65-
cd ~/project/ci-cache-persistent/openssl/openssl/openssl-OpenSSL_1_1_1f || exit
66-
make install_sw install_ssldirs

src/python_testing/TC_IDM_4_3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def on_empty_report():
172172
max_wait = sub_timeout_sec + 1
173173
try:
174174
await asyncio.wait_for(empty_report_event.wait(), timeout=max_wait)
175-
except asyncio.TimeoutError:
175+
except TimeoutError:
176176
asserts.fail("Empty report was not received")
177177

178178
asserts.assert_is_not_none(empty_report_time, "Empty report timing not captured")

0 commit comments

Comments
 (0)