From 10cd5f7f0fe14fbf51f2142ea2df153da33d1a21 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 16 Jun 2024 15:53:29 +0200 Subject: Remove OpenSSL dependency in favor of libimobiledevice-glue's hash functions This also removes the sha1/sha384 code from this repository since we are using the ones from libimobiledevice-glue now. --- src/asr.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'src/asr.c') diff --git a/src/asr.c b/src/asr.c index bf15dc2..aadf25a 100644 --- a/src/asr.c +++ b/src/asr.c @@ -30,15 +30,8 @@ #include #include #include -#ifdef HAVE_OPENSSL -#include -#else -#include "sha1.h" -#define SHA_CTX SHA1_CTX -#define SHA1_Init SHA1Init -#define SHA1_Update SHA1Update -#define SHA1_Final SHA1Final -#endif + +#include #include "asr.h" #include "idevicerestore.h" @@ -343,12 +336,6 @@ int asr_send_payload(asr_client_t asr, ipsw_file_handle_t file) data = (char*)malloc(ASR_PAYLOAD_CHUNK_SIZE + 20); - SHA_CTX sha1; - - if (asr->checksum_chunks) { - SHA1_Init(&sha1); - } - i = length; int retry = 3; while(i > 0 && retry >= 0) { @@ -367,7 +354,7 @@ int asr_send_payload(asr_client_t asr, ipsw_file_handle_t file) sendsize = size; if (asr->checksum_chunks) { - SHA1((unsigned char*)data, size, (unsigned char*)(data+size)); + sha1((unsigned char*)data, size, (unsigned char*)(data+size)); sendsize += 20; } if (asr_send_buffer(asr, data, sendsize) < 0) { -- cgit v1.1-32-gdbae