aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/updater/authenticode.go
diff options
context:
space:
mode:
Diffstat (limited to 'updater/authenticode.go')
-rw-r--r--updater/authenticode.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/updater/authenticode.go b/updater/authenticode.go
index d6d80df5..1e0a25c0 100644
--- a/updater/authenticode.go
+++ b/updater/authenticode.go
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: MIT
*
- * Copyright (C) 2019-2021 WireGuard LLC. All Rights Reserved.
+ * Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved.
*/
package updater
@@ -27,5 +27,8 @@ func verifyAuthenticode(path string) bool {
FilePath: path16,
}),
}
- return windows.WinVerifyTrustEx(windows.InvalidHWND, &windows.WINTRUST_ACTION_GENERIC_VERIFY_V2, data) == nil
+ verified := windows.WinVerifyTrustEx(windows.InvalidHWND, &windows.WINTRUST_ACTION_GENERIC_VERIFY_V2, data) == nil
+ data.StateAction = windows.WTD_STATEACTION_CLOSE
+ windows.WinVerifyTrustEx(windows.InvalidHWND, &windows.WINTRUST_ACTION_GENERIC_VERIFY_V2, data)
+ return verified
}