opencv-python icon indicating copy to clipboard operation
opencv-python copied to clipboard

manylinux: remove bundled OpenSSL to fix FIPS selftest failure

Open mulhamfetna opened this issue 6 months ago • 1 comments

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

  1. Remove vendored OpenSSL from the Dockerfile
  2. Configure FFmpeg to use system OpenSSL via pkg-config
  3. 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

mulhamfetna avatar May 09 '26 17:05 mulhamfetna

Will this work when OpenCV is run in a container running other distribution from the host?

kohtala avatar May 10 '26 16:05 kohtala