summaryrefslogtreecommitdiffstats
path: root/src/ipsw.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2020-06-02 03:23:07 +0200
committerGravatar Nikias Bassen2020-06-02 03:23:07 +0200
commit571e9645410482e74714e5089048682e05b3d3f8 (patch)
treef2309cc8cabdb9e681623ae1c7df75f921daf0e8 /src/ipsw.c
parent8036f3f227211fdff18cbbf85ab84f45a44c5add (diff)
downloadidevicerestore-571e9645410482e74714e5089048682e05b3d3f8.tar.gz
idevicerestore-571e9645410482e74714e5089048682e05b3d3f8.tar.bz2
Make OpenSSL dependency optional (used for SHA1)
Can be disabled with --without-openssl, otherwise auto-detected.
Diffstat (limited to 'src/ipsw.c')
-rw-r--r--src/ipsw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ipsw.c b/src/ipsw.c
index c8659e3..e7bd639 100644
--- a/src/ipsw.c
+++ b/src/ipsw.c
@@ -32,7 +32,15 @@
#include <limits.h>
#include <sys/stat.h>
#include <zip.h>
+#ifdef HAVE_OPENSSL
#include <openssl/sha.h>
+#else
+#include "sha1.h"
+#define SHA_CTX SHA1_CTX
+#define SHA1_Init SHA1Init
+#define SHA1_Update SHA1Update
+#define SHA1_Final SHA1Final
+#endif
#include "ipsw.h"
#include "locking.h"