aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/version/official_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'version/official_windows.go')
-rw-r--r--version/official_windows.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/version/official_windows.go b/version/official_windows.go
index d9f041f6..b0f62250 100644
--- a/version/official_windows.go
+++ b/version/official_windows.go
@@ -67,12 +67,12 @@ func IsRunningOfficialVersion() bool {
// This below tests is easily circumvented. False certificates can be appended, and just checking the
// common name is not very good. But that's okay, as this isn't security related.
- names, err := wintrust.ExtractCertificateNames(path)
+ certs, err := wintrust.ExtractCertificates(path)
if err != nil {
return false
}
- for _, name := range names {
- if name == officialCommonName {
+ for _, cert := range certs {
+ if cert.Subject.CommonName == officialCommonName {
return true
}
}