Skip to content

Commit 66f2a4c

Browse files
committed
Suppress deprecation warnings for engines in unit tests with OpenSSL 3.x
Engines are deprecated but should still work
1 parent 200859f commit 66f2a4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/check/engine/dummy-engine.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444
static int
4545
bind(ENGINE *engine, const char *id)
4646
{
47+
// Engines are deprecated but should still work with OpenSSL 3.x, so we just suppress the deprecation warnings
48+
// see ssl_engine() in src/ssl.c as well
49+
#if OPENSSL_VERSION_NUMBER >= 0x30000000L && !defined(LIBRESSL_VERSION_NUMBER)
50+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
51+
#endif /* OPENSSL_VERSION_NUMBER >= 0x30000000L */
52+
4753
if (!ENGINE_set_id(engine, "dummy")) {
4854
fprintf(stderr, "ENGINE_set_id() failed\n");
4955
return 0;

0 commit comments

Comments
 (0)