From 5a0eab0d364a18a41a981da55ed1e00815476887 Mon Sep 17 00:00:00 2001 From: lyc8503 Date: Fri, 23 Aug 2024 16:13:51 +0800 Subject: [PATCH] Patch: remove signature verify --- Sandboxie/core/drv/verify.c | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/Sandboxie/core/drv/verify.c b/Sandboxie/core/drv/verify.c index f545cde9cc..3ee0e9514e 100644 --- a/Sandboxie/core/drv/verify.c +++ b/Sandboxie/core/drv/verify.c @@ -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( @@ -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); -} \ No newline at end of file +}