forked from intel/vtpm-td
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the patch to support openssl3.1.1 in ms-tpm-20-ref
Refer to the PR:microsoft/ms-tpm-20-ref#93 If the PR is merged, this commit will be dropped. Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/TPMCmd/configure.ac b/TPMCmd/configure.ac | ||
index 58a74b4..4ff3253 100644 | ||
--- a/TPMCmd/configure.ac | ||
+++ b/TPMCmd/configure.ac | ||
@@ -51,7 +51,10 @@ AC_ARG_ENABLE(usedeviceid, | ||
AS_HELP_STRING([--enable-usedeviceid], | ||
[tpm simulator get seeds derived from hardware parameters. Seeds are not derived from secure hardware source.])) | ||
|
||
-PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto]) | ||
+PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto >= 3.0], | ||
+ [AC_DEFINE([OPENSSL_API_COMPAT], [10101])], | ||
+ [PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto])]) | ||
+ | ||
AS_IF([test "x$enable_usedeviceid" = "xyes"], [ | ||
PKG_CHECK_MODULES([LIBUDEV], [libudev]) | ||
[ADDITIONAL_LIBS="-ludev"] | ||
diff --git a/TPMCmd/tpm/include/Ossl/TpmToOsslMath.h b/TPMCmd/tpm/include/Ossl/TpmToOsslMath.h | ||
index 9836a3d..0cf9fea 100644 | ||
--- a/TPMCmd/tpm/include/Ossl/TpmToOsslMath.h | ||
+++ b/TPMCmd/tpm/include/Ossl/TpmToOsslMath.h | ||
@@ -49,11 +49,11 @@ | ||
|
||
#define SYMMETRIC_ALIGNMENT RADIX_BYTES | ||
|
||
-#if OPENSSL_VERSION_NUMBER >= 0x10200000L | ||
+#if OPENSSL_VERSION_NUMBER >= 0x30200000L | ||
// Check the bignum_st definition in crypto/bn/bn_lcl.h and either update the | ||
// version check or provide the new definition for this version. | ||
# error Untested OpenSSL version | ||
-#elif OPENSSL_VERSION_NUMBER >= 0x10100000L | ||
+#elif OPENSSL_VERSION_NUMBER >= 0x30000000L | ||
// from crypto/bn/bn_lcl.h | ||
struct bignum_st { | ||
BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters