diff mbox series

libstb: Work around deprecated API warnings on OpenSSL 3.0 systems

Message ID 20220525144228.318823-1-arbab@linux.ibm.com
State Accepted
Headers show
Series libstb: Work around deprecated API warnings on OpenSSL 3.0 systems | expand

Checks

Context Check Description
snowpatch_ozlabs/github-Docker_builds_and_checks fail check_build (ubuntu-rolling) failed at step Create Docker image.

Commit Message

Reza Arbab May 25, 2022, 2:42 p.m. UTC
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@linux.ibm.com>
---
 libstb/Makefile.inc | 1 +
 1 file changed, 1 insertion(+)

Comments

Reza Arbab June 13, 2022, 8:41 p.m. UTC | #1
On Wed, May 25, 2022 at 09:42:28AM -0500, Reza Arbab wrote:
>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

Applied to master.
diff mbox series

Patch

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, $<)