QNX7.0 and openssl 1.1.1

Hi all,

QNX 7.0 by default ships with openssl 1.0.2 but allows to install openssl 1.1.1 in parallel, see this technical article:

  • OpenSSL version 1.0.2: libcrypto.so.2 and libssl.so.2, headers under usr/include/openssl
  • OpenSSL version 1.1.1: libcrypto1_1.so.2.1 and libssl1_1.so.2.1, header under usr/include/openssl1_1

I like to link against openssl 1.1.1 and try to find the library with find_package(OpenSSL 1.1.1 EXACT), but unfortunately it does find the libraries for 1.0.2 and fails with the following error message (using cmake 3.19.3):

CMake Error at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR: Found unsuitable version "1.0.2r", but
  required is exact version "1.1.1" (found
  /opt/qnx700/target/qnx7/x86_64/usr/lib/libcrypto.so, )

I get the impression that the OpenSSL find module does not understand the “1_1” notion of QNX, always finds the default version 1.0.2 instead and fails while comparing the version string in the found header file.

What would be the best solution here?

I would rather avoid to provide a patched OpenSSL find module with the project.


I think the best would be to contribute to CMake’s FindOpenSSL that adds these names to the search list. But until that releases (it could conceivably go into a 3.23.x patch release), shipping a fix is the only thing to do there beyond manually setting the find_ variables to be what you need.

Hi @ben.boeckel,

I made the necessary adaptions to FindOpenSSL.cmake and tested it with my local installation. Unfortunetaly I can’t upload files to this forum. So I created a fork on Github.

Please let me know if this is suitable for you.


Contributions typically go through our GitLab repo. You can sign in with at github account and fork there as well.

As for the diffs, I think it looks fine. I’d just prefer the temp variables be unset at the end, but that’s minor.

Thanks, I see MR 7232.

Hi @ben.boeckel,

yes I created the the MR in the meantime just forgot to send the reply in this forum, thanks for the hint with github. Didn’t think that contribution is that easy. :slight_smile: