opencv-python
opencv-python copied to clipboard
manylinux: remove bundled OpenSSL to fix FIPS selftest failure
Summary
Fixes OpenSSL FIPS selftest failure when importing cv2 on FIPS-enabled systems.
Problem
On FIPS-enabled systems (RHEL, Rocky Linux, etc.), importing cv2 crashes with:
crypto/fips/fips.c:154: OpenSSL internal error: FATAL FIPS SELFTEST FAILURE
Aborted
Root Cause
The manylinux build bundles its own OpenSSL 1.1.1w, which is linked against FFmpeg. When the cv2 module loads, the bundled OpenSSL library triggers FIPS self-test failure because it was not built as FIPS-compliant.
Solution
- Remove vendored OpenSSL from the Dockerfile
- Configure FFmpeg to use system OpenSSL via pkg-config
- Update PKG_CONFIG_PATH to include system paths for OpenSSL discovery
Changes
docker/manylinux2014/Dockerfile_x86_64: Remove OpenSSL build steps, update FFmpeg configuration to use system OpenSSL, update PKG_CONFIG_PATH.github/CODEOWNERS: Add CODEOWNERS file (as in PR #1190)
Testing
The fix was verified by the original issue reporter who successfully built and tested the wheel on a FIPS-enabled system.
Related Issue
Fixes opencv/opencv-python#1191
Will this work when OpenCV is run in a container running other distribution from the host?