Skip to contentSkip to conversation

selftests/sgx: Ignore OpenSSL 3.0 deprecated functions warning

PATCH Superseded Kristen Carlson Accardi 3 participants 5 messages Jul 21, 2022 – Jul 28, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/sgx: Ignore OpenSSL 3.0 deprecated functions warning

OpenSSL 3.0 deprecates some of the functions used in the SGX selftests, causing build errors on new distros. For now ignore the warnings until support for the functions is no longer available.

---
 tools/testing/selftests/sgx/sigstruct.c | 3 +++
 1 file changed, 3 insertions(+)
tools/testing/selftests/sgx/sigstruct.c +3 -0
index 50c5ab1aa6fa..bb191b70141a 100644
@@ -17,6 +17,9 @@
 #include "defines.h"
 #include "main.h"
 
+/* OpenSSL 3.0 has deprecated some functions. For now just ignore the warnings. */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 struct q1q2_ctx {
 	BN_CTX *bn_ctx;
 	BIGNUM *m;
Signature · 1 line
2.36.1
#1 lore raw
Quoted 4 lines · Kristen Carlson Accardi

OpenSSL 3.0 deprecates some of the functions used in the SGX selftests, causing build errors on new distros. For now ignore the warnings until support for the functions is no longer available.

Are there some better functions we should be moving to?

#2 lore raw
Quoted 7 lines · Dave Hansen
Quoted 4 lines · Kristen Carlson Accardi

OpenSSL 3.0 deprecates some of the functions used in the SGX selftests, causing build errors on new distros. For now ignore the warnings until support for the functions is no longer available.

Are there some better functions we should be moving to?

I looked into this actually as my first choice, but the problem I had was that the recommended new functions weren't available on other OpenSSL libraries, and we'd have to add compatibility macros and stuff, so it seemed to me that the less complicated thing to do was wait till OpenSSL 1 was just not widely deployed anymore. This strategy is also being used in other scripts in the kernel.

#3 lore raw
Quoted 6 lines · Kristen Carlson Accardi
Quoted 5 lines · Dave Hansen
Quoted 4 lines · Kristen Carlson Accardi

OpenSSL 3.0 deprecates some of the functions used in the SGX selftests, causing build errors on new distros. For now ignore the warnings until support for the functions is no longer available.

Quoted 7 lines
Quoted 1 line

Are there some better functions we should be moving to?

I looked into this actually as my first choice, but the problem I had was that the recommended new functions weren't available on other OpenSSL libraries, and we'd have to add compatibility macros and stuff, so it seemed to me that the less complicated thing to do was wait till OpenSSL 1 was just not widely deployed anymore. This strategy is also being used in other scripts in the kernel.

Sounds sane to me. Thanks for the explanation.

maintainer
#4 lore raw
In reply to Kristen Carlson Accardi
Quoted 15 lines · Kristen Carlson Accardi

OpenSSL 3.0 deprecates some of the functions used in the SGX selftests, causing build errors on new distros. For now ignore the warnings until support for the functions is no longer available.

---
 tools/testing/selftests/sgx/sigstruct.c | 3 +++
 1 file changed, 3 insertions(+)
tools/testing/selftests/sgx/sigstruct.c +0 -0
index 50c5ab1aa6fa..bb191b70141a 100644

tools/testing/selftests/sgx/sigstruct.c line 20

Quoted 4 lines
tools/testing/selftests/sgx/sigstruct.c +1 -0
@@ -17,6 +17,9 @@
 #include "defines.h"
 #include "main.h"
 
+/* OpenSSL 3.0 has deprecated some functions. For now just ignore the warnings. */

Perhaps, even prefix with "FIXME:" prefix?

Quoted 8 lines
tools/testing/selftests/sgx/sigstruct.c +2 -0
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 struct q1q2_ctx {
 	BN_CTX *bn_ctx;
 	BIGNUM *m;
Signature · 1 line
2.36.1

BR, Jarkko