Skip to content

MINIFICPP-2784 Fixing OpenSSL cmake#2168

Open
martinzink wants to merge 3 commits intoapache:mainfrom
martinzink:openssl_streamlined_smashed
Open

MINIFICPP-2784 Fixing OpenSSL cmake#2168
martinzink wants to merge 3 commits intoapache:mainfrom
martinzink:openssl_streamlined_smashed

Conversation

@martinzink
Copy link
Copy Markdown
Member

@martinzink martinzink commented May 4, 2026

https://issues.apache.org/jira/browse/MINIFICPP-2784
The bundled openssl was not strict enough and sometimes it used the system headers while building, this caused build errors on systems where the openssl headers were not compatible with our bundled version. (e.g. arch linux, trixie, etc)

This also fixes the currently failing CI jobs namely


Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically main)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file?
  • If applicable, have you updated the NOTICE file?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens bundled OpenSSL handling across MiNiFi C++'s third-party CMake integrations so nested builds are less likely to mix bundled libraries with incompatible system headers.

Changes:

  • Add stricter bundled OpenSSL/crypto discovery helpers and update AWS CRT patches to use them.
  • Refactor several bundled dependency integrations (curl, libssh2, CivetWeb, Kubernetes client, Paho MQTT, AWS SDK, libarchive) to rely more on explicit target linking and propagated dependency roots.
  • Make a few supporting cleanup changes in extensions/tests, including ENABLE_ALL gating fixes and a small AgentInformation serialization refactor.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
thirdparty/aws-sdk-cpp/s2n.patch Patches s2n to use the repo’s OpenSSL finder and target names.
thirdparty/aws-sdk-cpp/aws-c-cal.patch Patches aws-c-cal to use strict OpenSSL/crypto lookup hooks.
libminifi/src/core/state/nodes/AgentInformation.cpp Minor local refactor when serializing allowable property values.
extensions/libarchive/CMakeLists.txt Makes libarchive extension honor ENABLE_ALL.
extensions/civetweb/CMakeLists.txt Makes civetweb extension honor ENABLE_ALL.
extensions/aws/tests/PutKinesisStreamTests.cpp Adds GCC-only warning suppression around AWS test mock code.
extensions/aws/tests/CMakeLists.txt Links AWS test executables directly against additional SDK targets.
extensions/aws/CMakeLists.txt Marks AWS SDK include dirs as SYSTEM interface includes.
cmake/ssl/FindOpenSSL.cmake Replaces the dummy bundled OpenSSL finder with a stricter path-based one.
cmake/ssl/FindCrypto.cmake Adds a strict bundled crypto finder for nested CMake builds.
cmake/PahoMqttC.cmake Switches Paho OpenSSL dependency wiring from add_dependencies to linking.
cmake/libssh2/sys/FindLibSSH2.cmake Reworks libssh2 finder to use strict root-based lookup.
cmake/KubernetesClientC.cmake Explicitly finds OpenSSL and links websockets to curl/OpenSSL.
cmake/curl/dummy/FindCURL.cmake Removes the old dummy bundled curl finder.
cmake/CivetWeb.cmake Explicitly finds OpenSSL, disables server executable, and links OpenSSL targets.
cmake/BundledOpenSSL.cmake Publishes OPENSSL_ROOT_DIR for downstream strict finders.
cmake/BundledLibSSH2.cmake Migrates bundled libssh2 build from ExternalProject to FetchContent.
cmake/BundledLibcURL.cmake Migrates bundled curl build to FetchContent and updates exported variables.
cmake/BundledLibArchive.cmake Passes curl/OpenSSL root hints into bundled libarchive’s nested build.
cmake/BundledAwsSdkCpp.cmake Expands AWS SDK patching and propagates strict dependency paths into the nested build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmake/ssl/FindOpenSSL.cmake
Comment thread thirdparty/aws-sdk-cpp/aws-c-cal.patch Outdated
Comment thread thirdparty/aws-sdk-cpp/s2n.patch Outdated
Comment thread cmake/BundledLibcURL.cmake Outdated
Comment thread cmake/ssl/FindOpenSSL.cmake Outdated
Comment thread cmake/ssl/FindOpenSSL.cmake
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@martinzink martinzink force-pushed the openssl_streamlined_smashed branch from f604d84 to 7f24b3f Compare May 4, 2026 11:54
Comment thread cmake/BundledLibcURL.cmake Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants