blob: 8b5669a1daf8425d8d0581a70fe87c25e201d79d [file] [log] [blame]
Serge Bazanski72c1f2b2024-06-04 13:42:48 +00001From 2cd6a191b0940d03d557941eda3395bdafbdb662 Mon Sep 17 00:00:00 2001
2From: Serge Bazanski <serge@monogon.tech>
3Date: Tue, 4 Jun 2024 12:59:11 +0200
4Subject: [PATCH 3/6] boringssl compat: removed EC_POINTs_mul
5
6This was deprecated in OpenSSL 3.0, we just need to 'fix' the ifdef
7guard to use the undeprecated APIs.
8---
9 src/tpm2/crypto/openssl/BnToOsslMath.c | 10 ----------
10 1 file changed, 10 deletions(-)
11
12diff --git a/src/tpm2/crypto/openssl/BnToOsslMath.c b/src/tpm2/crypto/openssl/BnToOsslMath.c
13index 1b9fb81..7d13ce8 100644
14--- a/src/tpm2/crypto/openssl/BnToOsslMath.c
15+++ b/src/tpm2/crypto/openssl/BnToOsslMath.c
16@@ -622,7 +622,6 @@ LIB_EXPORT BOOL BnEccModMult2(bigPoint R, // OUT: computed point
17 EC_POINT_mul(E->G, pR, bnD, pQ, bnU, E->CTX);
18 else
19 {
20-#if OPENSSL_VERSION_NUMBER >= 0x30000000L
21 EC_POINT *pR1 = EC_POINT_new(E->G);
22 EC_POINT *pR2 = EC_POINT_new(E->G);
23 int OK;
24@@ -635,15 +634,6 @@ LIB_EXPORT BOOL BnEccModMult2(bigPoint R, // OUT: computed point
25
26 EC_POINT_clear_free(pR1);
27 EC_POINT_clear_free(pR2);
28-#else
29- const EC_POINT* points[2];
30- const BIGNUM* scalars[2];
31- points[0] = pS;
32- points[1] = pQ;
33- scalars[0] = bnD;
34- scalars[1] = bnU;
35- EC_POINTs_mul(E->G, pR, NULL, 2, points, scalars, E->CTX);
36-#endif
37 }
38 PointFromOssl(R, pR, E);
39 EC_POINT_clear_free(pR); // libtpms changed
40--
412.42.0
42