Skip to content

Commit

Permalink
Patch: remove signature verify
Browse files Browse the repository at this point in the history
  • Loading branch information
lyc8503 authored Aug 23, 2024
1 parent 9daee23 commit 5a0eab0
Showing 1 changed file with 2 additions and 32 deletions.
34 changes: 2 additions & 32 deletions Sandboxie/core/drv/verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,37 +222,7 @@ NTSTATUS KphVerifySignature(
_In_ ULONG SignatureSize
)
{
NTSTATUS status;
BCRYPT_ALG_HANDLE signAlgHandle = NULL;
BCRYPT_KEY_HANDLE keyHandle = NULL;
PVOID hash = NULL;
ULONG hashSize;

// Import the trusted public key.

if (!NT_SUCCESS(status = BCryptOpenAlgorithmProvider(&signAlgHandle, KPH_SIGN_ALGORITHM, NULL, 0)))
goto CleanupExit;
if (!NT_SUCCESS(status = BCryptImportKeyPair(signAlgHandle, NULL, KPH_BLOB_PUBLIC, &keyHandle,
KphpTrustedPublicKey, sizeof(KphpTrustedPublicKey), 0)))
{
goto CleanupExit;
}

// Verify the hash.

if (!NT_SUCCESS(status = BCryptVerifySignature(keyHandle, NULL, Hash, HashSize, Signature,
SignatureSize, 0)))
{
goto CleanupExit;
}

CleanupExit:
if (keyHandle)
BCryptDestroyKey(keyHandle);
if (signAlgHandle)
BCryptCloseAlgorithmProvider(signAlgHandle, 0);

return status;
return STATUS_SUCCESS;
}

NTSTATUS KphVerifyFile(
Expand Down Expand Up @@ -1111,4 +1081,4 @@ void InitFwUuid()
wcscpy(g_uuid_str, L"00000000-0000-0000-0000-000000000000");

DbgPrint("sbie FW-UUID: %S\n", g_uuid_str);
}
}

0 comments on commit 5a0eab0

Please sign in to comment.