aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/version
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-11-17 09:58:33 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-17 09:59:02 +0100
commit08bacafd696c7c4d51fb3a0f8fd58953e76a1e44 (patch)
treee415387be94e162e9f46f1d9c9248efeaaf085cd /version
parentconf: do best-effort service argument migration (diff)
downloadwireguard-windows-08bacafd696c7c4d51fb3a0f8fd58953e76a1e44.tar.xz
wireguard-windows-08bacafd696c7c4d51fb3a0f8fd58953e76a1e44.zip
updater: do not allow WinVerifyTrust to use UI
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'version')
-rw-r--r--version/official_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/version/official_windows.go b/version/official_windows.go
index 5f8ea731..0ebdb8d8 100644
--- a/version/official_windows.go
+++ b/version/official_windows.go
@@ -47,7 +47,7 @@ func VerifyAuthenticode(path string) bool {
StateAction: wintrust.WTD_STATEACTION_VERIFY,
FileOrCatalogOrBlobOrSgnrOrCert: uintptr(unsafe.Pointer(file)),
}
- return wintrust.WinVerifyTrust(0, &wintrust.WINTRUST_ACTION_GENERIC_VERIFY_V2, data) == nil
+ return wintrust.WinVerifyTrust(windows.InvalidHandle, &wintrust.WINTRUST_ACTION_GENERIC_VERIFY_V2, data) == nil
}
// This is an easily by-passable check, which doesn't serve a security purpose but mostly just a low-grade