[Skiboot] [PATCH] libstb: Work around deprecated API warnings on OpenSSL 3.0 systems

Reza Arbab arbab at linux.ibm.com
Thu May 26 00:42:28 AEST 2022


Several OpenSSL APIs that libstb uses have been deprecated in OpenSSL
3.0. Commit 9a1f95f87004 ("libstb/create-container: avoid using
deprecated APIs when compiling with OpenSSL 3.0") enabled `make` to
succeed on an OpenSSL 3.0 system, but `make check` still fails:

  libstb/print-container.c:405:9: error: 'EC_KEY_new' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  libstb/print-container.c:413:9: error: 'EC_KEY_set_group' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  libstb/print-container.c:425:9: error: 'EC_POINT_bn2point' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  libstb/print-container.c:429:9: error: 'EC_KEY_set_public_key' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  libstb/print-container.c:434:9: error: 'ECDSA_do_verify' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  libstb/print-container.c:449:9: error: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]

This print-container.c is derived from the one in the sb-signing-utils
project. Ideally, OpenSSL 3.0 support should be added there first and
then synced back into skiboot. Until that is complete[1], build with
-Wno-error=deprecated-declarations so these errors stop blocking our CI.

[1] https://github.com/open-power/sb-signing-utils/issues/35

Signed-off-by: Reza Arbab <arbab at linux.ibm.com>
---
 libstb/Makefile.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libstb/Makefile.inc b/libstb/Makefile.inc
index b609801617dc..f8df787d1fa3 100644
--- a/libstb/Makefile.inc
+++ b/libstb/Makefile.inc
@@ -25,6 +25,7 @@ libstb/create-container: libstb/create-container.c libstb/container-utils.c
 	$(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) \
 	-Wpadded -O0 -g -I$(SRC) -I$(SRC)/include -o $@ $^ -lssl -lcrypto,$<)
 
+libstb/print-container: HOSTCFLAGS += -Wno-error=deprecated-declarations
 libstb/print-container: libstb/print-container.c libstb/container-utils.c
 	$(call Q, HOSTCC , $(HOSTCC) $(HOSTCFLAGS) \
 	-O0 -g -I$(SRC) -I$(SRC)/include -o $@ $^ -lssl -lcrypto, $<)
-- 
2.31.1



More information about the Skiboot mailing list