summaryrefslogtreecommitdiffstats
path: root/3rd_party/libsrp6a-sha512/t_math.c
diff options
context:
space:
mode:
authorGravatar Kabir Oberai2022-09-04 16:03:16 -0400
committerGravatar Kabir Oberai2022-09-04 16:03:16 -0400
commit377dda29ea0b5d28ff59c23be2a2a380fd6630ba (patch)
tree856dd9bf99007284d49b77ebdd99b729e570e657 /3rd_party/libsrp6a-sha512/t_math.c
parentfe827270782870ec05af0db574017fde1bd6a99b (diff)
downloadlibimobiledevice-377dda29ea0b5d28ff59c23be2a2a380fd6630ba.tar.gz
libimobiledevice-377dda29ea0b5d28ff59c23be2a2a380fd6630ba.tar.bz2
Support OpenSSL built without OPENSSL_ENGINE
Diffstat (limited to '3rd_party/libsrp6a-sha512/t_math.c')
-rw-r--r--3rd_party/libsrp6a-sha512/t_math.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/3rd_party/libsrp6a-sha512/t_math.c b/3rd_party/libsrp6a-sha512/t_math.c
index 88ae12f..e655daa 100644
--- a/3rd_party/libsrp6a-sha512/t_math.c
+++ b/3rd_party/libsrp6a-sha512/t_math.c
@@ -39,7 +39,8 @@ typedef BIGNUM * BigInteger;
39typedef BN_CTX * BigIntegerCtx; 39typedef BN_CTX * BigIntegerCtx;
40typedef BN_MONT_CTX * BigIntegerModAccel; 40typedef BN_MONT_CTX * BigIntegerModAccel;
41#include <limits.h> 41#include <limits.h>
42# ifdef OPENSSL_ENGINE 42# ifndef OPENSSL_NO_ENGINE
43# define OPENSSL_ENGINE
43# include "openssl/engine.h" 44# include "openssl/engine.h"
44static ENGINE * default_engine = NULL; 45static ENGINE * default_engine = NULL;
45# endif /* OPENSSL_ENGINE */ 46# endif /* OPENSSL_ENGINE */
@@ -951,7 +952,7 @@ BigIntegerModAccelFree(accel)
951BigIntegerResult 952BigIntegerResult
952BigIntegerInitialize() 953BigIntegerInitialize()
953{ 954{
954#if OPENSSL_VERSION_NUMBER >= 0x00907000 955#if OPENSSL_VERSION_NUMBER >= 0x00907000 && defined(OPENSSL_ENGINE)
955 ENGINE_load_builtin_engines(); 956 ENGINE_load_builtin_engines();
956#endif 957#endif
957 return BIG_INTEGER_SUCCESS; 958 return BIG_INTEGER_SUCCESS;