mirror of
https://github.com/tihmstar/futurerestore.git
synced 2025-01-08 20:25:30 +00:00
fixed type error when compiling with openssl (hopefully)
This commit is contained in:
parent
a3b088fd50
commit
920941159a
|
@ -534,19 +534,19 @@ int futurerestore::doRestore(const char *ipsw){
|
||||||
plist_dict_set_item(manifest, "SEP", sep_sep);
|
plist_dict_set_item(manifest, "SEP", sep_sep);
|
||||||
//check SEP
|
//check SEP
|
||||||
unsigned char genHash[48]; //SHA384 digest length
|
unsigned char genHash[48]; //SHA384 digest length
|
||||||
ptr_smart<char *>sephash = NULL;
|
ptr_smart<unsigned char *>sephash = NULL;
|
||||||
uint64_t sephashlen = 0;
|
uint64_t sephashlen = 0;
|
||||||
plist_t digest = plist_dict_get_item(sep_sep, "Digest");
|
plist_t digest = plist_dict_get_item(sep_sep, "Digest");
|
||||||
if (!digest || plist_get_node_type(digest) != PLIST_DATA)
|
if (!digest || plist_get_node_type(digest) != PLIST_DATA)
|
||||||
reterror(-66, "ERROR: can't find sep digest\n");
|
reterror(-66, "ERROR: can't find sep digest\n");
|
||||||
|
|
||||||
plist_get_data_val(digest, &sephash, &sephashlen);
|
plist_get_data_val(digest, reinterpret_cast<char **>(&sephash), &sephashlen);
|
||||||
|
|
||||||
if (sephashlen == 20)
|
if (sephashlen == 20)
|
||||||
SHA1(_client->sepfwdata, (unsigned int)_client->sepfwdatasize, genHash);
|
SHA1(_client->sepfwdata, (unsigned int)_client->sepfwdatasize, genHash);
|
||||||
else
|
else
|
||||||
SHA384(_client->sepfwdata, (unsigned int)_client->sepfwdatasize, genHash);
|
SHA384(_client->sepfwdata, (unsigned int)_client->sepfwdatasize, genHash);
|
||||||
if (memcmp(genHash, static_cast<const char *>(sephash), sephashlen))
|
if (memcmp(genHash, sephash, sephashlen))
|
||||||
reterror(-67, "ERROR: SEP does not match sepmanifest\n");
|
reterror(-67, "ERROR: SEP does not match sepmanifest\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,8 @@ public:
|
||||||
ptr_smart(){_p = NULL;}
|
ptr_smart(){_p = NULL;}
|
||||||
T operator=(T p){return _p = p;}
|
T operator=(T p){return _p = p;}
|
||||||
T *operator&(){return &_p;}
|
T *operator&(){return &_p;}
|
||||||
explicit operator const char*() const {return _p;}
|
operator const T() const {return _p;}
|
||||||
|
operator const void*() const {return _p;}
|
||||||
~ptr_smart(){if (_p) (_ptr_free) ? _ptr_free(_p) : free((void*)_p);}
|
~ptr_smart(){if (_p) (_ptr_free) ? _ptr_free(_p) : free((void*)_p);}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue