# QNX7.0 and openssl 1.1.1

**URL:** https://discourse.cmake.org/t/qnx7-0-and-openssl-1-1-1/5567
**Category:** Usage
**Tags:** os:qnx
**Created:** [April 28, 2022, 5:03pm UTC](https://discourse.cmake.org/t/qnx7-0-and-openssl-1-1-1/5567 "2022-04-28T17:03:53Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![georg](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/g/9f8e36/32.png) [@georg](https://discourse.cmake.org/u/georg)
#### Post date: [April 28, 2022, 5:03pm UTC](https://discourse.cmake.org/t/qnx7-0-and-openssl-1-1-1/5567/1 "2022-04-28T17:03:53Z")

</div>

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](http://www.qnx.com/developers/articles/rel_6726_0.html):

- 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):

```auto
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.

Regards  
Georg

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [April 28, 2022, 11:50pm UTC](https://discourse.cmake.org/t/qnx7-0-and-openssl-1-1-1/5567/2 "2022-04-28T23:50:35Z")

</div>

> [@georg](#):
>
> What would be the best solution here?

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.

---

<div class="post-metadata">

### Author: ![georg](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/g/9f8e36/32.png) [@georg](https://discourse.cmake.org/u/georg)
#### Post date: [May 2, 2022, 4:21pm UTC](https://discourse.cmake.org/t/qnx7-0-and-openssl-1-1-1/5567/3 "2022-05-02T16:21:10Z")

</div>

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](https://github.com/sercxanto/CMake/blob/qnx_openssl11/Modules/FindOpenSSL.cmake).

Please let me know if this is suitable for you.

Regards  
Georg

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 2, 2022, 6:45pm UTC](https://discourse.cmake.org/t/qnx7-0-and-openssl-1-1-1/5567/4 "2022-05-02T18:45:21Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 2, 2022, 9:49pm UTC](https://discourse.cmake.org/t/qnx7-0-and-openssl-1-1-1/5567/5 "2022-05-02T21:49:31Z")

</div>

Thanks, I see [MR 7232](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7232).

---

<div class="post-metadata">

### Author: ![georg](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/g/9f8e36/32.png) [@georg](https://discourse.cmake.org/u/georg)
#### Post date: [May 4, 2022, 4:47pm UTC](https://discourse.cmake.org/t/qnx7-0-and-openssl-1-1-1/5567/6 "2022-05-04T16:47:27Z")

</div>

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. 🙂

Regards  
Georg
