[edk2-devel] [PATCH 15/22] CryptoPkg/openssl: adapt EcSm2Null.c for openssl 3.0

Gerd Hoffmann kraxel at redhat.com
Mon Mar 13 08:30:09 UTC 2023


Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
 CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 +-
 CryptoPkg/Library/OpensslLib/EcSm2Null.c          | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
index c796effe23fd..5bd6fa09ab33 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
@@ -38,7 +38,7 @@ [Sources]
   buildinf.c
   ossl_store.c
   rand_pool.c
-  SslNull.c
+#  SslNull.c
   EcSm2Null.c
 
 [Packages]
diff --git a/CryptoPkg/Library/OpensslLib/EcSm2Null.c b/CryptoPkg/Library/OpensslLib/EcSm2Null.c
index 6d5ab2d4cc88..b72a74918933 100644
--- a/CryptoPkg/Library/OpensslLib/EcSm2Null.c
+++ b/CryptoPkg/Library/OpensslLib/EcSm2Null.c
@@ -9,8 +9,9 @@
 #include <Base.h>
 #include <Library/DebugLib.h>
 
-#undef OPENSSL_NO_EC
+#undef EDK2_OPENSSL_NOEC
 
+#include <openssl/types.h>
 #include <openssl/objects.h>
 #include <openssl/bn.h>
 #include <openssl/ec.h>
@@ -300,9 +301,9 @@ ECDH_compute_key (
   return 0;
 }
 
-struct ec_key_st *
+const struct ec_key_st *
 EVP_PKEY_get0_EC_KEY (
-  EVP_PKEY  *pkey
+  const EVP_PKEY  *pkey
   )
 {
   ASSERT (FALSE);
-- 
2.39.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101074): https://edk2.groups.io/g/devel/message/101074
Mute This Topic: https://groups.io/mt/97576420/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list