Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

‘ENGINE_free’ is deprecated: Since OpenSSL 3.0 at tlsio_openssl.c #2351

Closed
matsujirushi opened this issue Aug 12, 2022 · 2 comments
Closed

Comments

@matsujirushi
Copy link

Hi,
When I compiled iothub_ll_telemetry_sample on Ubuntu 22.04, I got a compilation error at the OpenSSL call part.

Error message:

/home/azureuser/azure-iot-sdk-c/c-utility/adapters/tlsio_openssl.c: In function ‘engine_destroy’:
/home/azureuser/azure-iot-sdk-c/c-utility/adapters/tlsio_openssl.c:762:9: error: ‘ENGINE_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  762 |         ENGINE_free(tls->engine); // Release structural reference.
      |         ^~~~~~~~~~~
In file included from /home/azureuser/azure-iot-sdk-c/c-utility/adapters/tlsio_openssl.c:9:
/usr/include/openssl/engine.h:493:27: note: declared here
  493 | OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e);
      |                           ^~~~~~~~~~~
/home/azureuser/azure-iot-sdk-c/c-utility/adapters/tlsio_openssl.c: In function ‘engine_load’:
/home/azureuser/azure-iot-sdk-c/c-utility/adapters/tlsio_openssl.c:772:5: error: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  772 |     tls->engine = ENGINE_by_id(tls->engine_id);
      |     ^~~
In file included from /home/azureuser/azure-iot-sdk-c/c-utility/adapters/tlsio_openssl.c:9:
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
...

Is there any way to avoid the error?

Azure IoT C SDK:

git clone -b LTS_07_2022_Ref01 https://github.com/Azure/azure-iot-sdk-c.git
cd azure-iot-sdk-c
git submodule update --init

cmake:

$ cmake -DCMAKE_BUILD_TYPE=Debug -Dbuild_service_client=OFF -Dbuild_provisioning_service_client=OFF -Duse_amqp=OFF -Duse_http=OFF ..
...
-- IoT Client SDK Version = 1.9.0
...
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.2")  
...
@danewalton
Copy link
Member

Hi @matsujirushi
This is currently a work in progress here: #2346

You may try the branch yourself. Right now we are looking to fix our E2E tests and once that works, it should be merged.

@matsujirushi
Copy link
Author

Hi @danewalton ,
Thanks for information.
That branch is compiled and working.
Thank you very much!

git checkout origin/dane/openssl3
git submodule update --init

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants