Skip to content

Commit 7948c29

Browse files
authored
Merge pull request #84 from pi-hole/ftl-build/update_mbedtls
Update mbedtls from 3.4.1 to 3.5.0
2 parents 7d18911 + fc209a7 commit 7948c29

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

ftl-build/alpine/Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
ARG CONTAINER="alpine:edge"
22
FROM ${CONTAINER} AS builder
33

4+
ARG TARGETPLATFORM
45
ARG idnversion=1.41
56
ARG readlineversion=8.1
67
ARG termcapversion=1.3.1
78
ARG nettleversion=3.9.1
8-
ARG mbedtlsversion=3.4.1
9+
ARG mbedtlsversion=3.5.0
910

1011
RUN apk add --no-cache \
1112
alpine-sdk \
@@ -74,10 +75,16 @@ RUN curl -sSL https://ftl.pi-hole.net/libraries/nettle-${nettleversion}.tar.gz |
7475
&& rm -r nettle-${nettleversion}
7576

7677
# Build static mbedTLS with pthread support
78+
# Disable AESNI on linux/386 asit would possibly result in an incompatible
79+
# binary in processors lacking the AESNI and SSE2 instruction sets
7780
RUN curl -sSL https://ftl.pi-hole.net/libraries/mbedtls-${mbedtlsversion}.tar.gz | tar -xz \
7881
&& cd mbedtls-${mbedtlsversion} \
7982
&& sed -i '/#define MBEDTLS_THREADING_C/s*^//**g' include/mbedtls/mbedtls_config.h \
8083
&& sed -i '/#define MBEDTLS_THREADING_PTHREAD/s*^//**g' include/mbedtls/mbedtls_config.h \
84+
&& ( [ "${TARGETPLATFORM}" = "linux/386" ] \
85+
&& echo "BUILDING WITHOUT AESNI SUPPORT" \
86+
&& sed -i '/#define MBEDTLS_AESNI_C/s*^*//*g' include/mbedtls/mbedtls_config.h \
87+
|| echo "BUILDING WITH AESNI SUPPORT" ) \
8188
&& make -j $(nproc) install \
8289
&& cd .. \
8390
&& rm -r mbedtls-${mbedtlsversion}

ftl-build/debian/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG idnversion=1.41
77
ARG readlineversion=8.1
88
ARG termcapversion=1.3.1
99
ARG nettleversion=3.9.1
10-
ARG mbedtlsversion=3.4.1
10+
ARG mbedtlsversion=3.5.0
1111

1212
# Switch repositories to the archive server
1313
RUN if [ "${CONTAINER}" = "debian:stretch-slim" ]; then \

0 commit comments

Comments
 (0)