mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 792452 - Updater code updates for multi signature changes. r=bsmith
This commit is contained in:
parent
b4c32d97e4
commit
e1d7888127
@ -44,7 +44,7 @@ static char *outbuf = NULL;
|
||||
* @return TRUE on success
|
||||
*/
|
||||
BOOL
|
||||
LoadFileInResource(int name, int type, const char *&data, DWORD& size)
|
||||
LoadFileInResource(int name, int type, const uint8_t *&data, uint32_t& size)
|
||||
{
|
||||
HMODULE handle = GetModuleHandle(NULL);
|
||||
if (!handle) {
|
||||
@ -66,7 +66,7 @@ LoadFileInResource(int name, int type, const char *&data, DWORD& size)
|
||||
}
|
||||
|
||||
size = SizeofResource(handle, resourceInfoBlockHandle);
|
||||
data = static_cast<const char*>(::LockResource(resourceHandle));
|
||||
data = static_cast<const uint8_t*>(::LockResource(resourceHandle));
|
||||
FreeLibrary(handle);
|
||||
return TRUE;
|
||||
}
|
||||
@ -83,13 +83,13 @@ LoadFileInResource(int name, int type, const char *&data, DWORD& size)
|
||||
int
|
||||
VerifyLoadedCert(MarFile *archive, int name, int type)
|
||||
{
|
||||
DWORD size = 0;
|
||||
const char *data = NULL;
|
||||
uint32_t size = 0;
|
||||
const uint8_t *data = NULL;
|
||||
if (!LoadFileInResource(name, type, data, size) || !data || !size) {
|
||||
return CERT_LOAD_ERROR;
|
||||
}
|
||||
|
||||
if (mar_verify_signatureW(archive, data, size)) {
|
||||
if (mar_verify_signaturesW(archive, &data, &size, 1)) {
|
||||
return CERT_VERIFY_ERROR;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user