tools: avoid OpenSSL deprecation warnings

Our Gitlab CI buildsystem is set up to treat warnings as errors.
With OpenSSL 3.0 a lot of deprecation warnings occur.

With the patch compatibility with OpenSSL 1.1.1 is declared.
In the long run we should upgrade our code to use the current API.

A -Wdiscarded-qualifiers warning is muted by casting.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index 875f636..da8bfe0 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -8,6 +8,8 @@
  * <thomas.petazzoni@free-electrons.com>
  */
 
+#define OPENSSL_API_COMPAT 0x10101000L
+
 #include "imagetool.h"
 #include <limits.h>
 #include <image.h>