tpm2: fix build for LibreSSL 4.1.0

With LibreSSL 4.1.0 the EC_POINTs_mul function was removed, but the
newer OpenSSL 3 code path works instead.

Signed-off-by: orbea <orbea@riseup.net>
This commit is contained in:
orbea 2025-05-24 20:19:35 -07:00 committed by Stefan Berger
parent e79d68e2d9
commit 95fff22c9b

View File

@ -621,7 +621,7 @@ LIB_EXPORT BOOL BnEccModMult2(bigPoint R, // OUT: computed point
EC_POINT_mul(E->G, pR, bnD, pQ, bnU, E->CTX);
else
{
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#if OPENSSL_VERSION_NUMBER >= 0x30000000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x4010000fL)
EC_POINT *pR1 = EC_POINT_new(E->G);
EC_POINT *pR2 = EC_POINT_new(E->G);
int OK;