aports/community/ibmswtpm2/openssl-3.1.patch

38 lines
1.2 KiB
Diff

Patch-Source: https://sourceforge.net/p/ibmswtpm2/tpm2/ci/15501bf4973d334ca9420fa2fb0f0fe1800871e0
--
--- a/TpmToOsslMath.h
+++ b/TpmToOsslMath.h
@@ -54,7 +54,7 @@
/* arising in any way out of use or reliance upon this specification or any */
/* information herein. */
/* */
-/* (c) Copyright IBM Corp. and others, 2016 - 2022 */
+/* (c) Copyright IBM Corp. and others, 2016 - 2023 */
/* */
/********************************************************************************/
@@ -72,16 +72,20 @@
#define SYMMETRIC_ALIGNMENT RADIX_BYTES
-#if OPENSSL_VERSION_NUMBER > 0x300000ffL
+/*
+ * As of release 3.0.0, OPENSSL_VERSION_NUMBER is a combination of the
+ * major (M), minor (NN) and patch (PP) version into a single integer 0xMNN00PP0L
+ */
+#if OPENSSL_VERSION_NUMBER > 0x30100ff0L
// Check the bignum_st definition in crypto/bn/bn_lcl.h or crypto/bn/bn_local.h and either update
// the version check or provide the new definition for this version.
-// Currently safe for all 3.0.n.a
+// Currently safe for all 3.1.x
# error Untested OpenSSL version
#elif OPENSSL_VERSION_NUMBER >= 0x10100000L
// from crypto/bn/bn_lcl.h
struct bignum_st {
BN_ULONG *d;
- int top;
+ int top;
int dmax;
int neg;