mirror of
https://github.com/amnezia-vpn/amneziawg-windows-client.git
synced 2026-07-03 14:05:10 +02:00
9f501c58d4
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
36 lines
653 B
Go
36 lines
653 B
Go
/* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright (C) 2019-2020 WireGuard LLC. All Rights Reserved.
|
|
*/
|
|
|
|
package version
|
|
|
|
import (
|
|
"bytes"
|
|
"fmt"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
// For testing the updater package from linux. Debug stuff only.
|
|
|
|
func utsToStr(u [65]byte) string {
|
|
i := bytes.IndexByte(u[:], 0)
|
|
if i < 0 {
|
|
return string(u[:])
|
|
}
|
|
return string(u[:i])
|
|
}
|
|
|
|
func OsName() string {
|
|
var utsname unix.Utsname
|
|
if unix.Uname(&utsname) != nil {
|
|
return "Unix Unknown"
|
|
}
|
|
return fmt.Sprintf("%s %s %s", utsToStr(utsname.Sysname), utsToStr(utsname.Release), utsToStr(utsname.Version))
|
|
}
|
|
|
|
func VerifyAuthenticode(path string) bool {
|
|
return true
|
|
}
|