Skip to content

Commit

Permalink
Merge pull request #84 from pi-hole/ftl-build/update_mbedtls
Browse files Browse the repository at this point in the history
Update mbedtls from 3.4.1 to 3.5.0
  • Loading branch information
DL6ER committed Oct 16, 2023
2 parents 7d18911 + fc209a7 commit 7948c29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion ftl-build/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ARG CONTAINER="alpine:edge"
FROM ${CONTAINER} AS builder

ARG TARGETPLATFORM
ARG idnversion=1.41
ARG readlineversion=8.1
ARG termcapversion=1.3.1
ARG nettleversion=3.9.1
ARG mbedtlsversion=3.4.1
ARG mbedtlsversion=3.5.0

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

# Build static mbedTLS with pthread support
# Disable AESNI on linux/386 asit would possibly result in an incompatible
# binary in processors lacking the AESNI and SSE2 instruction sets
RUN curl -sSL https://ftl.pi-hole.net/libraries/mbedtls-${mbedtlsversion}.tar.gz | tar -xz \
&& cd mbedtls-${mbedtlsversion} \
&& sed -i '/#define MBEDTLS_THREADING_C/s*^//**g' include/mbedtls/mbedtls_config.h \
&& sed -i '/#define MBEDTLS_THREADING_PTHREAD/s*^//**g' include/mbedtls/mbedtls_config.h \
&& ( [ "${TARGETPLATFORM}" = "linux/386" ] \
&& echo "BUILDING WITHOUT AESNI SUPPORT" \
&& sed -i '/#define MBEDTLS_AESNI_C/s*^*//*g' include/mbedtls/mbedtls_config.h \
|| echo "BUILDING WITH AESNI SUPPORT" ) \
&& make -j $(nproc) install \
&& cd .. \
&& rm -r mbedtls-${mbedtlsversion}
Expand Down
2 changes: 1 addition & 1 deletion ftl-build/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG idnversion=1.41
ARG readlineversion=8.1
ARG termcapversion=1.3.1
ARG nettleversion=3.9.1
ARG mbedtlsversion=3.4.1
ARG mbedtlsversion=3.5.0

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

0 comments on commit 7948c29

Please sign in to comment.