diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-10-01 13:03:36 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-10-01 13:14:23 +0200 |
commit | 3932f8ac9fcedc41b478414ea78bbd3bf50364ee (patch) | |
tree | 52318575b200e084b2c7c1fc94c20bba7e782582 /version/wintrust/zsyscall_windows.go | |
parent | build: bump and loosen go version (diff) | |
download | wireguard-windows-3932f8ac9fcedc41b478414ea78bbd3bf50364ee.tar.xz wireguard-windows-3932f8ac9fcedc41b478414ea78bbd3bf50364ee.zip |
Revert "version: use crypt32 instead of go x509 for cn extraction for file size"
This reverts commit 4cdc8fef9973a8d82593bff4e7cb350a20e0fa78.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | version/wintrust/zsyscall_windows.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/version/wintrust/zsyscall_windows.go b/version/wintrust/zsyscall_windows.go index 7c742938..4d73cc5e 100644 --- a/version/wintrust/zsyscall_windows.go +++ b/version/wintrust/zsyscall_windows.go @@ -40,9 +40,8 @@ var ( modwintrust = windows.NewLazySystemDLL("wintrust.dll") modcrypt32 = windows.NewLazySystemDLL("crypt32.dll") - procWinVerifyTrust = modwintrust.NewProc("WinVerifyTrust") - procCryptQueryObject = modcrypt32.NewProc("CryptQueryObject") - procCertGetNameStringW = modcrypt32.NewProc("CertGetNameStringW") + procWinVerifyTrust = modwintrust.NewProc("WinVerifyTrust") + procCryptQueryObject = modcrypt32.NewProc("CryptQueryObject") ) func WinVerifyTrust(hWnd windows.Handle, actionId *windows.GUID, data *WinTrustData) (err error) { @@ -68,9 +67,3 @@ func cryptQueryObject(objectType uint32, object uintptr, expectedContentTypeFlag } return } - -func certGetNameString(certContext *windows.CertContext, nameType uint32, flags uint32, typePara uintptr, name *uint16, size uint32) (chars uint32) { - r0, _, _ := syscall.Syscall6(procCertGetNameStringW.Addr(), 6, uintptr(unsafe.Pointer(certContext)), uintptr(nameType), uintptr(flags), uintptr(typePara), uintptr(unsafe.Pointer(name)), uintptr(size)) - chars = uint32(r0) - return -} |