Skip to content

Commit 896ba17

Browse files
committed
manylinux: remove bundled OpenSSL to fix FIPS selftest failure
Removes vendored OpenSSL 1.1.1w from manylinux build and relies on system OpenSSL instead. FFmpeg is still built with OpenSSL support via system pkg-config paths. Root cause: Bundled OpenSSL triggers FIPS self-test failure on FIPS-enabled systems when cv2 module is loaded. Fixes: #1191
1 parent 19a9c9b commit 896ba17

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @skvark @alalek

docker/manylinux2014/Dockerfile_x86_64

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ ARG FREETYPE_VERSION=2.14.1
99
ARG LIBPNG_VERSION=1.6.53
1010
ARG VPX_VERSION=v1.15.2
1111
ARG NASM_VERSION=2.15.04
12-
ARG OPENSSL_VERSION=1_1_1w
1312
ARG QT_VERSION=5.15.18
1413
ARG YASM_VERSION=1.3.0
1514
ARG AOM_VERSION=v3.13.1
@@ -60,18 +59,7 @@ RUN curl -O -L https://download.qt.io/archive/qt/5.15/${QT_VERSION}/single/qt-ev
6059
ENV QTDIR /opt/Qt${QT_VERSION}
6160
ENV PATH "$QTDIR/bin:$PATH"
6261

63-
RUN mkdir ~/openssl_sources && \
64-
cd ~/openssl_sources && \
65-
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION}.tar.gz && \
66-
tar -xf OpenSSL_${OPENSSL_VERSION}.tar.gz && \
67-
cd openssl-OpenSSL_${OPENSSL_VERSION} && \
68-
./config --prefix="/ffmpeg_build" --openssldir="/ffmpeg_build" no-pinshared shared zlib && \
69-
make -j$(getconf _NPROCESSORS_ONLN) && \
70-
# skip installing documentation
71-
make install_sw && \
72-
cd .. && \
73-
rm -rf ~/openssl_build ~/openssl_sources
74-
62+
# nasm
7563
RUN mkdir ~/nasm_sources && \
7664
cd ~/nasm_sources && \
7765
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.gz && \
@@ -82,6 +70,7 @@ RUN mkdir ~/nasm_sources && \
8270
cd .. && \
8371
rm -rf ~/nasm_sources
8472

73+
# yasm
8574
RUN mkdir ~/yasm_sources && \
8675
cd ~/yasm_sources && \
8776
curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz && \
@@ -121,13 +110,23 @@ RUN mkdir ~/avif_sources && \
121110
make install && \
122111
cd / && rm -rf ~/avif_sources
123112

113+
# FFmpeg (uses system OpenSSL via pkg-config for FIPS compatibility)
124114
RUN mkdir ~/ffmpeg_sources && \
125115
cd ~/ffmpeg_sources && \
126116
curl -O -L https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz && \
127117
tar -xf ffmpeg-${FFMPEG_VERSION}.tar.gz && \
128118
cd ffmpeg-${FFMPEG_VERSION} && \
129119
PATH=~/bin:$PATH && \
130-
PKG_CONFIG_PATH="/ffmpeg_build/lib/pkgconfig" ./configure --prefix="/ffmpeg_build" --extra-cflags="-I/ffmpeg_build/include" --extra-ldflags="-L/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
120+
PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/ffmpeg_build/lib/pkgconfig" \
121+
./configure \
122+
--prefix="/ffmpeg_build" \
123+
--extra-cflags="-I/ffmpeg_build/include" \
124+
--extra-ldflags="-L/ffmpeg_build/lib" \
125+
--enable-openssl \
126+
--enable-libvpx \
127+
--enable-shared \
128+
--enable-pic \
129+
--bindir="$HOME/bin" && \
131130
make -j$(getconf _NPROCESSORS_ONLN) && \
132131
make install && \
133132
echo "/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
@@ -157,6 +156,6 @@ USER ci
157156
# Git security vulnerability: https://github.blog/2022-04-12-git-security-vulnerability-announced
158157
RUN git config --global --add safe.directory /io
159158

160-
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/ffmpeg_build/lib/pkgconfig
159+
ENV PKG_CONFIG_PATH /usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/ffmpeg_build/lib/pkgconfig
161160
ENV LDFLAGS -L/ffmpeg_build/lib
162161
ENV PATH "$HOME/bin:$PATH"

0 commit comments

Comments
 (0)