Update k8s dependency version to 1.21
Signed-off-by: xinyanwu409 <wxinyan@vmware>
This commit is contained in:
44
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
44
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
@@ -18,9 +18,11 @@ import (
|
||||
)
|
||||
|
||||
type Handle uintptr
|
||||
type HWND uintptr
|
||||
|
||||
const (
|
||||
InvalidHandle = ^Handle(0)
|
||||
InvalidHWND = ^HWND(0)
|
||||
|
||||
// Flags for DefineDosDevice.
|
||||
DDD_EXACT_MATCH_ON_REMOVE = 0x00000004
|
||||
@@ -206,14 +208,18 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys GetSystemTimeAsFileTime(time *Filetime)
|
||||
//sys GetSystemTimePreciseAsFileTime(time *Filetime)
|
||||
//sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff]
|
||||
//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error)
|
||||
//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error)
|
||||
//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error)
|
||||
//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error)
|
||||
//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error)
|
||||
//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error)
|
||||
//sys CancelIo(s Handle) (err error)
|
||||
//sys CancelIoEx(s Handle, o *Overlapped) (err error)
|
||||
//sys CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = CreateProcessW
|
||||
//sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error)
|
||||
//sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW
|
||||
//sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId
|
||||
//sys GetShellWindow() (shellWindow HWND) = user32.GetShellWindow
|
||||
//sys MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW
|
||||
//sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx
|
||||
//sys shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) = shell32.SHGetKnownFolderPath
|
||||
//sys TerminateProcess(handle Handle, exitcode uint32) (err error)
|
||||
//sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error)
|
||||
@@ -259,17 +265,32 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) = kernel32.VirtualProtect
|
||||
//sys TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile
|
||||
//sys ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW
|
||||
//sys FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.FindFirstChangeNotificationW
|
||||
//sys FindNextChangeNotification(handle Handle) (err error)
|
||||
//sys FindCloseChangeNotification(handle Handle) (err error)
|
||||
//sys CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) = crypt32.CertOpenSystemStoreW
|
||||
//sys CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) = crypt32.CertOpenStore
|
||||
//sys CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) = crypt32.CertOpenStore
|
||||
//sys CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) [failretval==nil] = crypt32.CertEnumCertificatesInStore
|
||||
//sys CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore
|
||||
//sys CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore
|
||||
//sys CertCloseStore(store Handle, flags uint32) (err error) = crypt32.CertCloseStore
|
||||
//sys CertDeleteCertificateFromStore(certContext *CertContext) (err error) = crypt32.CertDeleteCertificateFromStore
|
||||
//sys CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain
|
||||
//sys CertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain
|
||||
//sys CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext
|
||||
//sys CertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext
|
||||
//sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy
|
||||
//sys CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) = crypt32.CertDuplicateCertificateContext
|
||||
//sys PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) = crypt32.PFXImportCertStore
|
||||
//sys CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain
|
||||
//sys CertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain
|
||||
//sys CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext
|
||||
//sys CertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext
|
||||
//sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy
|
||||
//sys CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) = crypt32.CertGetNameStringW
|
||||
//sys CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) = crypt32.CertFindExtension
|
||||
//sys CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) [failretval==nil] = crypt32.CertFindCertificateInStore
|
||||
//sys CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) [failretval==nil] = crypt32.CertFindChainInStore
|
||||
//sys CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) = crypt32.CryptAcquireCertificatePrivateKey
|
||||
//sys CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) = crypt32.CryptQueryObject
|
||||
//sys CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) = crypt32.CryptDecodeObject
|
||||
//sys CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptProtectData
|
||||
//sys CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptUnprotectData
|
||||
//sys WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) = wintrust.WinVerifyTrustEx
|
||||
//sys RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) = advapi32.RegOpenKeyExW
|
||||
//sys RegCloseKey(key Handle) (regerrno error) = advapi32.RegCloseKey
|
||||
//sys RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegQueryInfoKeyW
|
||||
@@ -342,8 +363,6 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) [failretval==0] = QueryDosDeviceW
|
||||
//sys SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) = SetVolumeLabelW
|
||||
//sys SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) = SetVolumeMountPointW
|
||||
//sys MessageBox(hwnd Handle, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW
|
||||
//sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx
|
||||
//sys InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) = advapi32.InitiateSystemShutdownExW
|
||||
//sys SetProcessShutdownParameters(level uint32, flags uint32) (err error) = kernel32.SetProcessShutdownParameters
|
||||
//sys GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) = kernel32.GetProcessShutdownParameters
|
||||
@@ -754,6 +773,7 @@ const socket_error = uintptr(^uint32(0))
|
||||
//sys WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASend
|
||||
//sys WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom
|
||||
//sys WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo
|
||||
//sys WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.WSASocketW
|
||||
//sys GetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname
|
||||
//sys GetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname
|
||||
//sys Ntohs(netshort uint16) (u uint16) = ws2_32.ntohs
|
||||
|
437
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
437
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
@@ -227,7 +227,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
// filters for ReadDirectoryChangesW
|
||||
// filters for ReadDirectoryChangesW and FindFirstChangeNotificationW
|
||||
FILE_NOTIFY_CHANGE_FILE_NAME = 0x001
|
||||
FILE_NOTIFY_CHANGE_DIR_NAME = 0x002
|
||||
FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x004
|
||||
@@ -249,24 +249,27 @@ const (
|
||||
|
||||
const (
|
||||
// wincrypt.h
|
||||
PROV_RSA_FULL = 1
|
||||
PROV_RSA_SIG = 2
|
||||
PROV_DSS = 3
|
||||
PROV_FORTEZZA = 4
|
||||
PROV_MS_EXCHANGE = 5
|
||||
PROV_SSL = 6
|
||||
PROV_RSA_SCHANNEL = 12
|
||||
PROV_DSS_DH = 13
|
||||
PROV_EC_ECDSA_SIG = 14
|
||||
PROV_EC_ECNRA_SIG = 15
|
||||
PROV_EC_ECDSA_FULL = 16
|
||||
PROV_EC_ECNRA_FULL = 17
|
||||
PROV_DH_SCHANNEL = 18
|
||||
PROV_SPYRUS_LYNKS = 20
|
||||
PROV_RNG = 21
|
||||
PROV_INTEL_SEC = 22
|
||||
PROV_REPLACE_OWF = 23
|
||||
PROV_RSA_AES = 24
|
||||
/* certenrolld_begin -- PROV_RSA_*/
|
||||
PROV_RSA_FULL = 1
|
||||
PROV_RSA_SIG = 2
|
||||
PROV_DSS = 3
|
||||
PROV_FORTEZZA = 4
|
||||
PROV_MS_EXCHANGE = 5
|
||||
PROV_SSL = 6
|
||||
PROV_RSA_SCHANNEL = 12
|
||||
PROV_DSS_DH = 13
|
||||
PROV_EC_ECDSA_SIG = 14
|
||||
PROV_EC_ECNRA_SIG = 15
|
||||
PROV_EC_ECDSA_FULL = 16
|
||||
PROV_EC_ECNRA_FULL = 17
|
||||
PROV_DH_SCHANNEL = 18
|
||||
PROV_SPYRUS_LYNKS = 20
|
||||
PROV_RNG = 21
|
||||
PROV_INTEL_SEC = 22
|
||||
PROV_REPLACE_OWF = 23
|
||||
PROV_RSA_AES = 24
|
||||
|
||||
/* dwFlags definitions for CryptAcquireContext */
|
||||
CRYPT_VERIFYCONTEXT = 0xF0000000
|
||||
CRYPT_NEWKEYSET = 0x00000008
|
||||
CRYPT_DELETEKEYSET = 0x00000010
|
||||
@@ -274,6 +277,34 @@ const (
|
||||
CRYPT_SILENT = 0x00000040
|
||||
CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080
|
||||
|
||||
/* Flags for PFXImportCertStore */
|
||||
CRYPT_EXPORTABLE = 0x00000001
|
||||
CRYPT_USER_PROTECTED = 0x00000002
|
||||
CRYPT_USER_KEYSET = 0x00001000
|
||||
PKCS12_PREFER_CNG_KSP = 0x00000100
|
||||
PKCS12_ALWAYS_CNG_KSP = 0x00000200
|
||||
PKCS12_ALLOW_OVERWRITE_KEY = 0x00004000
|
||||
PKCS12_NO_PERSIST_KEY = 0x00008000
|
||||
PKCS12_INCLUDE_EXTENDED_PROPERTIES = 0x00000010
|
||||
|
||||
/* Flags for CryptAcquireCertificatePrivateKey */
|
||||
CRYPT_ACQUIRE_CACHE_FLAG = 0x00000001
|
||||
CRYPT_ACQUIRE_USE_PROV_INFO_FLAG = 0x00000002
|
||||
CRYPT_ACQUIRE_COMPARE_KEY_FLAG = 0x00000004
|
||||
CRYPT_ACQUIRE_NO_HEALING = 0x00000008
|
||||
CRYPT_ACQUIRE_SILENT_FLAG = 0x00000040
|
||||
CRYPT_ACQUIRE_WINDOW_HANDLE_FLAG = 0x00000080
|
||||
CRYPT_ACQUIRE_NCRYPT_KEY_FLAGS_MASK = 0x00070000
|
||||
CRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG = 0x00010000
|
||||
CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG = 0x00020000
|
||||
CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG = 0x00040000
|
||||
|
||||
/* pdwKeySpec for CryptAcquireCertificatePrivateKey */
|
||||
AT_KEYEXCHANGE = 1
|
||||
AT_SIGNATURE = 2
|
||||
CERT_NCRYPT_KEY_SPEC = 0xFFFFFFFF
|
||||
|
||||
/* Default usage match type is AND with value zero */
|
||||
USAGE_MATCH_TYPE_AND = 0
|
||||
USAGE_MATCH_TYPE_OR = 1
|
||||
|
||||
@@ -398,6 +429,89 @@ const (
|
||||
CERT_TRUST_IS_CA_TRUSTED = 0x00004000
|
||||
CERT_TRUST_IS_COMPLEX_CHAIN = 0x00010000
|
||||
|
||||
/* Certificate Information Flags */
|
||||
CERT_INFO_VERSION_FLAG = 1
|
||||
CERT_INFO_SERIAL_NUMBER_FLAG = 2
|
||||
CERT_INFO_SIGNATURE_ALGORITHM_FLAG = 3
|
||||
CERT_INFO_ISSUER_FLAG = 4
|
||||
CERT_INFO_NOT_BEFORE_FLAG = 5
|
||||
CERT_INFO_NOT_AFTER_FLAG = 6
|
||||
CERT_INFO_SUBJECT_FLAG = 7
|
||||
CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG = 8
|
||||
CERT_INFO_ISSUER_UNIQUE_ID_FLAG = 9
|
||||
CERT_INFO_SUBJECT_UNIQUE_ID_FLAG = 10
|
||||
CERT_INFO_EXTENSION_FLAG = 11
|
||||
|
||||
/* dwFindType for CertFindCertificateInStore */
|
||||
CERT_COMPARE_MASK = 0xFFFF
|
||||
CERT_COMPARE_SHIFT = 16
|
||||
CERT_COMPARE_ANY = 0
|
||||
CERT_COMPARE_SHA1_HASH = 1
|
||||
CERT_COMPARE_NAME = 2
|
||||
CERT_COMPARE_ATTR = 3
|
||||
CERT_COMPARE_MD5_HASH = 4
|
||||
CERT_COMPARE_PROPERTY = 5
|
||||
CERT_COMPARE_PUBLIC_KEY = 6
|
||||
CERT_COMPARE_HASH = CERT_COMPARE_SHA1_HASH
|
||||
CERT_COMPARE_NAME_STR_A = 7
|
||||
CERT_COMPARE_NAME_STR_W = 8
|
||||
CERT_COMPARE_KEY_SPEC = 9
|
||||
CERT_COMPARE_ENHKEY_USAGE = 10
|
||||
CERT_COMPARE_CTL_USAGE = CERT_COMPARE_ENHKEY_USAGE
|
||||
CERT_COMPARE_SUBJECT_CERT = 11
|
||||
CERT_COMPARE_ISSUER_OF = 12
|
||||
CERT_COMPARE_EXISTING = 13
|
||||
CERT_COMPARE_SIGNATURE_HASH = 14
|
||||
CERT_COMPARE_KEY_IDENTIFIER = 15
|
||||
CERT_COMPARE_CERT_ID = 16
|
||||
CERT_COMPARE_CROSS_CERT_DIST_POINTS = 17
|
||||
CERT_COMPARE_PUBKEY_MD5_HASH = 18
|
||||
CERT_COMPARE_SUBJECT_INFO_ACCESS = 19
|
||||
CERT_COMPARE_HASH_STR = 20
|
||||
CERT_COMPARE_HAS_PRIVATE_KEY = 21
|
||||
CERT_FIND_ANY = (CERT_COMPARE_ANY << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_SHA1_HASH = (CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_MD5_HASH = (CERT_COMPARE_MD5_HASH << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_SIGNATURE_HASH = (CERT_COMPARE_SIGNATURE_HASH << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_KEY_IDENTIFIER = (CERT_COMPARE_KEY_IDENTIFIER << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_HASH = CERT_FIND_SHA1_HASH
|
||||
CERT_FIND_PROPERTY = (CERT_COMPARE_PROPERTY << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_PUBLIC_KEY = (CERT_COMPARE_PUBLIC_KEY << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_SUBJECT_NAME = (CERT_COMPARE_NAME<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
|
||||
CERT_FIND_SUBJECT_ATTR = (CERT_COMPARE_ATTR<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
|
||||
CERT_FIND_ISSUER_NAME = (CERT_COMPARE_NAME<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
|
||||
CERT_FIND_ISSUER_ATTR = (CERT_COMPARE_ATTR<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
|
||||
CERT_FIND_SUBJECT_STR_A = (CERT_COMPARE_NAME_STR_A<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
|
||||
CERT_FIND_SUBJECT_STR_W = (CERT_COMPARE_NAME_STR_W<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
|
||||
CERT_FIND_SUBJECT_STR = CERT_FIND_SUBJECT_STR_W
|
||||
CERT_FIND_ISSUER_STR_A = (CERT_COMPARE_NAME_STR_A<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
|
||||
CERT_FIND_ISSUER_STR_W = (CERT_COMPARE_NAME_STR_W<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
|
||||
CERT_FIND_ISSUER_STR = CERT_FIND_ISSUER_STR_W
|
||||
CERT_FIND_KEY_SPEC = (CERT_COMPARE_KEY_SPEC << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_ENHKEY_USAGE = (CERT_COMPARE_ENHKEY_USAGE << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_CTL_USAGE = CERT_FIND_ENHKEY_USAGE
|
||||
CERT_FIND_SUBJECT_CERT = (CERT_COMPARE_SUBJECT_CERT << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_ISSUER_OF = (CERT_COMPARE_ISSUER_OF << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_EXISTING = (CERT_COMPARE_EXISTING << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_CERT_ID = (CERT_COMPARE_CERT_ID << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_CROSS_CERT_DIST_POINTS = (CERT_COMPARE_CROSS_CERT_DIST_POINTS << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_PUBKEY_MD5_HASH = (CERT_COMPARE_PUBKEY_MD5_HASH << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_SUBJECT_INFO_ACCESS = (CERT_COMPARE_SUBJECT_INFO_ACCESS << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_HASH_STR = (CERT_COMPARE_HASH_STR << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_HAS_PRIVATE_KEY = (CERT_COMPARE_HAS_PRIVATE_KEY << CERT_COMPARE_SHIFT)
|
||||
CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG = 0x1
|
||||
CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG = 0x2
|
||||
CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG = 0x4
|
||||
CERT_FIND_NO_ENHKEY_USAGE_FLAG = 0x8
|
||||
CERT_FIND_OR_ENHKEY_USAGE_FLAG = 0x10
|
||||
CERT_FIND_VALID_ENHKEY_USAGE_FLAG = 0x20
|
||||
CERT_FIND_OPTIONAL_CTL_USAGE_FLAG = CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG
|
||||
CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG = CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG
|
||||
CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG = CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG
|
||||
CERT_FIND_NO_CTL_USAGE_FLAG = CERT_FIND_NO_ENHKEY_USAGE_FLAG
|
||||
CERT_FIND_OR_CTL_USAGE_FLAG = CERT_FIND_OR_ENHKEY_USAGE_FLAG
|
||||
CERT_FIND_VALID_CTL_USAGE_FLAG = CERT_FIND_VALID_ENHKEY_USAGE_FLAG
|
||||
|
||||
/* policyOID values for CertVerifyCertificateChainPolicy function */
|
||||
CERT_CHAIN_POLICY_BASE = 1
|
||||
CERT_CHAIN_POLICY_AUTHENTICODE = 2
|
||||
@@ -409,6 +523,82 @@ const (
|
||||
CERT_CHAIN_POLICY_EV = 8
|
||||
CERT_CHAIN_POLICY_SSL_F12 = 9
|
||||
|
||||
/* flag for dwFindType CertFindChainInStore */
|
||||
CERT_CHAIN_FIND_BY_ISSUER = 1
|
||||
|
||||
/* dwFindFlags for CertFindChainInStore when dwFindType == CERT_CHAIN_FIND_BY_ISSUER */
|
||||
CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG = 0x0001
|
||||
CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG = 0x0002
|
||||
CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG = 0x0004
|
||||
CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG = 0x0008
|
||||
CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG = 0x4000
|
||||
CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG = 0x8000
|
||||
|
||||
/* Certificate Store close flags */
|
||||
CERT_CLOSE_STORE_FORCE_FLAG = 0x00000001
|
||||
CERT_CLOSE_STORE_CHECK_FLAG = 0x00000002
|
||||
|
||||
/* CryptQueryObject object type */
|
||||
CERT_QUERY_OBJECT_FILE = 1
|
||||
CERT_QUERY_OBJECT_BLOB = 2
|
||||
|
||||
/* CryptQueryObject content type flags */
|
||||
CERT_QUERY_CONTENT_CERT = 1
|
||||
CERT_QUERY_CONTENT_CTL = 2
|
||||
CERT_QUERY_CONTENT_CRL = 3
|
||||
CERT_QUERY_CONTENT_SERIALIZED_STORE = 4
|
||||
CERT_QUERY_CONTENT_SERIALIZED_CERT = 5
|
||||
CERT_QUERY_CONTENT_SERIALIZED_CTL = 6
|
||||
CERT_QUERY_CONTENT_SERIALIZED_CRL = 7
|
||||
CERT_QUERY_CONTENT_PKCS7_SIGNED = 8
|
||||
CERT_QUERY_CONTENT_PKCS7_UNSIGNED = 9
|
||||
CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED = 10
|
||||
CERT_QUERY_CONTENT_PKCS10 = 11
|
||||
CERT_QUERY_CONTENT_PFX = 12
|
||||
CERT_QUERY_CONTENT_CERT_PAIR = 13
|
||||
CERT_QUERY_CONTENT_PFX_AND_LOAD = 14
|
||||
CERT_QUERY_CONTENT_FLAG_CERT = (1 << CERT_QUERY_CONTENT_CERT)
|
||||
CERT_QUERY_CONTENT_FLAG_CTL = (1 << CERT_QUERY_CONTENT_CTL)
|
||||
CERT_QUERY_CONTENT_FLAG_CRL = (1 << CERT_QUERY_CONTENT_CRL)
|
||||
CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE = (1 << CERT_QUERY_CONTENT_SERIALIZED_STORE)
|
||||
CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT = (1 << CERT_QUERY_CONTENT_SERIALIZED_CERT)
|
||||
CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL = (1 << CERT_QUERY_CONTENT_SERIALIZED_CTL)
|
||||
CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL = (1 << CERT_QUERY_CONTENT_SERIALIZED_CRL)
|
||||
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED = (1 << CERT_QUERY_CONTENT_PKCS7_SIGNED)
|
||||
CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED = (1 << CERT_QUERY_CONTENT_PKCS7_UNSIGNED)
|
||||
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED = (1 << CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED)
|
||||
CERT_QUERY_CONTENT_FLAG_PKCS10 = (1 << CERT_QUERY_CONTENT_PKCS10)
|
||||
CERT_QUERY_CONTENT_FLAG_PFX = (1 << CERT_QUERY_CONTENT_PFX)
|
||||
CERT_QUERY_CONTENT_FLAG_CERT_PAIR = (1 << CERT_QUERY_CONTENT_CERT_PAIR)
|
||||
CERT_QUERY_CONTENT_FLAG_PFX_AND_LOAD = (1 << CERT_QUERY_CONTENT_PFX_AND_LOAD)
|
||||
CERT_QUERY_CONTENT_FLAG_ALL = (CERT_QUERY_CONTENT_FLAG_CERT | CERT_QUERY_CONTENT_FLAG_CTL | CERT_QUERY_CONTENT_FLAG_CRL | CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED | CERT_QUERY_CONTENT_FLAG_PKCS10 | CERT_QUERY_CONTENT_FLAG_PFX | CERT_QUERY_CONTENT_FLAG_CERT_PAIR)
|
||||
CERT_QUERY_CONTENT_FLAG_ALL_ISSUER_CERT = (CERT_QUERY_CONTENT_FLAG_CERT | CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED)
|
||||
|
||||
/* CryptQueryObject format type flags */
|
||||
CERT_QUERY_FORMAT_BINARY = 1
|
||||
CERT_QUERY_FORMAT_BASE64_ENCODED = 2
|
||||
CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED = 3
|
||||
CERT_QUERY_FORMAT_FLAG_BINARY = (1 << CERT_QUERY_FORMAT_BINARY)
|
||||
CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED = (1 << CERT_QUERY_FORMAT_BASE64_ENCODED)
|
||||
CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED = (1 << CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED)
|
||||
CERT_QUERY_FORMAT_FLAG_ALL = (CERT_QUERY_FORMAT_FLAG_BINARY | CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED | CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED)
|
||||
|
||||
/* CertGetNameString name types */
|
||||
CERT_NAME_EMAIL_TYPE = 1
|
||||
CERT_NAME_RDN_TYPE = 2
|
||||
CERT_NAME_ATTR_TYPE = 3
|
||||
CERT_NAME_SIMPLE_DISPLAY_TYPE = 4
|
||||
CERT_NAME_FRIENDLY_DISPLAY_TYPE = 5
|
||||
CERT_NAME_DNS_TYPE = 6
|
||||
CERT_NAME_URL_TYPE = 7
|
||||
CERT_NAME_UPN_TYPE = 8
|
||||
|
||||
/* CertGetNameString flags */
|
||||
CERT_NAME_ISSUER_FLAG = 0x1
|
||||
CERT_NAME_DISABLE_IE4_UTF8_FLAG = 0x10000
|
||||
CERT_NAME_SEARCH_ALL_NAMES_FLAG = 0x2
|
||||
CERT_NAME_STR_ENABLE_PUNYCODE_FLAG = 0x00200000
|
||||
|
||||
/* AuthType values for SSLExtraCertChainPolicyPara struct */
|
||||
AUTHTYPE_CLIENT = 1
|
||||
AUTHTYPE_SERVER = 2
|
||||
@@ -419,6 +609,22 @@ const (
|
||||
SECURITY_FLAG_IGNORE_WRONG_USAGE = 0x00000200
|
||||
SECURITY_FLAG_IGNORE_CERT_CN_INVALID = 0x00001000
|
||||
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID = 0x00002000
|
||||
|
||||
/* Flags for Crypt[Un]ProtectData */
|
||||
CRYPTPROTECT_UI_FORBIDDEN = 0x1
|
||||
CRYPTPROTECT_LOCAL_MACHINE = 0x4
|
||||
CRYPTPROTECT_CRED_SYNC = 0x8
|
||||
CRYPTPROTECT_AUDIT = 0x10
|
||||
CRYPTPROTECT_NO_RECOVERY = 0x20
|
||||
CRYPTPROTECT_VERIFY_PROTECTION = 0x40
|
||||
CRYPTPROTECT_CRED_REGENERATE = 0x80
|
||||
|
||||
/* Flags for CryptProtectPromptStruct */
|
||||
CRYPTPROTECT_PROMPT_ON_UNPROTECT = 1
|
||||
CRYPTPROTECT_PROMPT_ON_PROTECT = 2
|
||||
CRYPTPROTECT_PROMPT_RESERVED = 4
|
||||
CRYPTPROTECT_PROMPT_STRONG = 8
|
||||
CRYPTPROTECT_PROMPT_REQUIRE_STRONG = 16
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -441,10 +647,58 @@ const (
|
||||
REALTIME_PRIORITY_CLASS = 0x00000100
|
||||
)
|
||||
|
||||
/* wintrust.h constants for WinVerifyTrustEx */
|
||||
const (
|
||||
WTD_UI_ALL = 1
|
||||
WTD_UI_NONE = 2
|
||||
WTD_UI_NOBAD = 3
|
||||
WTD_UI_NOGOOD = 4
|
||||
|
||||
WTD_REVOKE_NONE = 0
|
||||
WTD_REVOKE_WHOLECHAIN = 1
|
||||
|
||||
WTD_CHOICE_FILE = 1
|
||||
WTD_CHOICE_CATALOG = 2
|
||||
WTD_CHOICE_BLOB = 3
|
||||
WTD_CHOICE_SIGNER = 4
|
||||
WTD_CHOICE_CERT = 5
|
||||
|
||||
WTD_STATEACTION_IGNORE = 0x00000000
|
||||
WTD_STATEACTION_VERIFY = 0x00000010
|
||||
WTD_STATEACTION_CLOSE = 0x00000002
|
||||
WTD_STATEACTION_AUTO_CACHE = 0x00000003
|
||||
WTD_STATEACTION_AUTO_CACHE_FLUSH = 0x00000004
|
||||
|
||||
WTD_USE_IE4_TRUST_FLAG = 0x1
|
||||
WTD_NO_IE4_CHAIN_FLAG = 0x2
|
||||
WTD_NO_POLICY_USAGE_FLAG = 0x4
|
||||
WTD_REVOCATION_CHECK_NONE = 0x10
|
||||
WTD_REVOCATION_CHECK_END_CERT = 0x20
|
||||
WTD_REVOCATION_CHECK_CHAIN = 0x40
|
||||
WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x80
|
||||
WTD_SAFER_FLAG = 0x100
|
||||
WTD_HASH_ONLY_FLAG = 0x200
|
||||
WTD_USE_DEFAULT_OSVER_CHECK = 0x400
|
||||
WTD_LIFETIME_SIGNING_FLAG = 0x800
|
||||
WTD_CACHE_ONLY_URL_RETRIEVAL = 0x1000
|
||||
WTD_DISABLE_MD2_MD4 = 0x2000
|
||||
WTD_MOTW = 0x4000
|
||||
|
||||
WTD_UICONTEXT_EXECUTE = 0
|
||||
WTD_UICONTEXT_INSTALL = 1
|
||||
)
|
||||
|
||||
var (
|
||||
OID_PKIX_KP_SERVER_AUTH = []byte("1.3.6.1.5.5.7.3.1\x00")
|
||||
OID_SERVER_GATED_CRYPTO = []byte("1.3.6.1.4.1.311.10.3.3\x00")
|
||||
OID_SGC_NETSCAPE = []byte("2.16.840.1.113730.4.1\x00")
|
||||
|
||||
WINTRUST_ACTION_GENERIC_VERIFY_V2 = GUID{
|
||||
Data1: 0xaac56b,
|
||||
Data2: 0xcd44,
|
||||
Data3: 0x11d0,
|
||||
Data4: [8]byte{0x8c, 0xc2, 0x0, 0xc0, 0x4f, 0xc2, 0x95, 0xee},
|
||||
}
|
||||
)
|
||||
|
||||
// Pointer represents a pointer to an arbitrary Windows type.
|
||||
@@ -540,6 +794,14 @@ type win32finddata1 struct {
|
||||
Reserved1 uint32
|
||||
FileName [MAX_PATH]uint16
|
||||
AlternateFileName [14]uint16
|
||||
|
||||
// The Microsoft documentation for this struct¹ describes three additional
|
||||
// fields: dwFileType, dwCreatorType, and wFinderFlags. However, those fields
|
||||
// are empirically only present in the macOS port of the Win32 API,² and thus
|
||||
// not needed for binaries built for Windows.
|
||||
//
|
||||
// ¹ https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataw describe
|
||||
// ² https://golang.org/issue/42637#issuecomment-760715755.
|
||||
}
|
||||
|
||||
func copyFindData(dst *Win32finddata, src *win32finddata1) {
|
||||
@@ -777,6 +1039,18 @@ type WSAMsg struct {
|
||||
Flags uint32
|
||||
}
|
||||
|
||||
// Flags for WSASocket
|
||||
const (
|
||||
WSA_FLAG_OVERLAPPED = 0x01
|
||||
WSA_FLAG_MULTIPOINT_C_ROOT = 0x02
|
||||
WSA_FLAG_MULTIPOINT_C_LEAF = 0x04
|
||||
WSA_FLAG_MULTIPOINT_D_ROOT = 0x08
|
||||
WSA_FLAG_MULTIPOINT_D_LEAF = 0x10
|
||||
WSA_FLAG_ACCESS_SYSTEM_SECURITY = 0x40
|
||||
WSA_FLAG_NO_HANDLE_INHERIT = 0x80
|
||||
WSA_FLAG_REGISTERED_IO = 0x100
|
||||
)
|
||||
|
||||
// Invented values to support what package os expects.
|
||||
const (
|
||||
S_IFMT = 0x1f000
|
||||
@@ -1033,7 +1307,57 @@ type MibIfRow struct {
|
||||
}
|
||||
|
||||
type CertInfo struct {
|
||||
// Not implemented
|
||||
Version uint32
|
||||
SerialNumber CryptIntegerBlob
|
||||
SignatureAlgorithm CryptAlgorithmIdentifier
|
||||
Issuer CertNameBlob
|
||||
NotBefore Filetime
|
||||
NotAfter Filetime
|
||||
Subject CertNameBlob
|
||||
SubjectPublicKeyInfo CertPublicKeyInfo
|
||||
IssuerUniqueId CryptBitBlob
|
||||
SubjectUniqueId CryptBitBlob
|
||||
CountExtensions uint32
|
||||
Extensions *CertExtension
|
||||
}
|
||||
|
||||
type CertExtension struct {
|
||||
ObjId *byte
|
||||
Critical int32
|
||||
Value CryptObjidBlob
|
||||
}
|
||||
|
||||
type CryptAlgorithmIdentifier struct {
|
||||
ObjId *byte
|
||||
Parameters CryptObjidBlob
|
||||
}
|
||||
|
||||
type CertPublicKeyInfo struct {
|
||||
Algorithm CryptAlgorithmIdentifier
|
||||
PublicKey CryptBitBlob
|
||||
}
|
||||
|
||||
type DataBlob struct {
|
||||
Size uint32
|
||||
Data *byte
|
||||
}
|
||||
type CryptIntegerBlob DataBlob
|
||||
type CryptUintBlob DataBlob
|
||||
type CryptObjidBlob DataBlob
|
||||
type CertNameBlob DataBlob
|
||||
type CertRdnValueBlob DataBlob
|
||||
type CertBlob DataBlob
|
||||
type CrlBlob DataBlob
|
||||
type CryptDataBlob DataBlob
|
||||
type CryptHashBlob DataBlob
|
||||
type CryptDigestBlob DataBlob
|
||||
type CryptDerBlob DataBlob
|
||||
type CryptAttrBlob DataBlob
|
||||
|
||||
type CryptBitBlob struct {
|
||||
Size uint32
|
||||
Data *byte
|
||||
UnusedBits uint32
|
||||
}
|
||||
|
||||
type CertContext struct {
|
||||
@@ -1139,6 +1463,79 @@ type CertChainPolicyStatus struct {
|
||||
ExtraPolicyStatus Pointer
|
||||
}
|
||||
|
||||
type CertPolicyInfo struct {
|
||||
Identifier *byte
|
||||
CountQualifiers uint32
|
||||
Qualifiers *CertPolicyQualifierInfo
|
||||
}
|
||||
|
||||
type CertPoliciesInfo struct {
|
||||
Count uint32
|
||||
PolicyInfos *CertPolicyInfo
|
||||
}
|
||||
|
||||
type CertPolicyQualifierInfo struct {
|
||||
// Not implemented
|
||||
}
|
||||
|
||||
type CertStrongSignPara struct {
|
||||
Size uint32
|
||||
InfoChoice uint32
|
||||
InfoOrSerializedInfoOrOID unsafe.Pointer
|
||||
}
|
||||
|
||||
type CryptProtectPromptStruct struct {
|
||||
Size uint32
|
||||
PromptFlags uint32
|
||||
App HWND
|
||||
Prompt *uint16
|
||||
}
|
||||
|
||||
type CertChainFindByIssuerPara struct {
|
||||
Size uint32
|
||||
UsageIdentifier *byte
|
||||
KeySpec uint32
|
||||
AcquirePrivateKeyFlags uint32
|
||||
IssuerCount uint32
|
||||
Issuer Pointer
|
||||
FindCallback Pointer
|
||||
FindArg Pointer
|
||||
IssuerChainIndex *uint32
|
||||
IssuerElementIndex *uint32
|
||||
}
|
||||
|
||||
type WinTrustData struct {
|
||||
Size uint32
|
||||
PolicyCallbackData uintptr
|
||||
SIPClientData uintptr
|
||||
UIChoice uint32
|
||||
RevocationChecks uint32
|
||||
UnionChoice uint32
|
||||
FileOrCatalogOrBlobOrSgnrOrCert unsafe.Pointer
|
||||
StateAction uint32
|
||||
StateData Handle
|
||||
URLReference *uint16
|
||||
ProvFlags uint32
|
||||
UIContext uint32
|
||||
SignatureSettings *WinTrustSignatureSettings
|
||||
}
|
||||
|
||||
type WinTrustFileInfo struct {
|
||||
Size uint32
|
||||
FilePath *uint16
|
||||
File Handle
|
||||
KnownSubject *GUID
|
||||
}
|
||||
|
||||
type WinTrustSignatureSettings struct {
|
||||
Size uint32
|
||||
Index uint32
|
||||
Flags uint32
|
||||
SecondarySigs uint32
|
||||
VerifiedSigIndex uint32
|
||||
CryptoPolicy *CertStrongSignPara
|
||||
}
|
||||
|
||||
const (
|
||||
// do not reorder
|
||||
HKEY_CLASSES_ROOT = 0x80000000 + iota
|
||||
|
34
vendor/golang.org/x/sys/windows/types_windows_arm64.go
generated
vendored
Normal file
34
vendor/golang.org/x/sys/windows/types_windows_arm64.go
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright 2011 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package windows
|
||||
|
||||
type WSAData struct {
|
||||
Version uint16
|
||||
HighVersion uint16
|
||||
MaxSockets uint16
|
||||
MaxUdpDg uint16
|
||||
VendorInfo *byte
|
||||
Description [WSADESCRIPTION_LEN + 1]byte
|
||||
SystemStatus [WSASYS_STATUS_LEN + 1]byte
|
||||
}
|
||||
|
||||
type Servent struct {
|
||||
Name *byte
|
||||
Aliases **byte
|
||||
Proto *byte
|
||||
Port uint16
|
||||
}
|
||||
|
||||
type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
|
||||
PerProcessUserTimeLimit int64
|
||||
PerJobUserTimeLimit int64
|
||||
LimitFlags uint32
|
||||
MinimumWorkingSetSize uintptr
|
||||
MaximumWorkingSetSize uintptr
|
||||
ActiveProcessLimit uint32
|
||||
Affinity uintptr
|
||||
PriorityClass uint32
|
||||
SchedulingClass uint32
|
||||
}
|
187
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
187
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
@@ -51,6 +51,7 @@ var (
|
||||
modshell32 = NewLazySystemDLL("shell32.dll")
|
||||
moduser32 = NewLazySystemDLL("user32.dll")
|
||||
moduserenv = NewLazySystemDLL("userenv.dll")
|
||||
modwintrust = NewLazySystemDLL("wintrust.dll")
|
||||
modws2_32 = NewLazySystemDLL("ws2_32.dll")
|
||||
modwtsapi32 = NewLazySystemDLL("wtsapi32.dll")
|
||||
|
||||
@@ -143,13 +144,24 @@ var (
|
||||
procCertCloseStore = modcrypt32.NewProc("CertCloseStore")
|
||||
procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext")
|
||||
procCertDeleteCertificateFromStore = modcrypt32.NewProc("CertDeleteCertificateFromStore")
|
||||
procCertDuplicateCertificateContext = modcrypt32.NewProc("CertDuplicateCertificateContext")
|
||||
procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore")
|
||||
procCertFindCertificateInStore = modcrypt32.NewProc("CertFindCertificateInStore")
|
||||
procCertFindChainInStore = modcrypt32.NewProc("CertFindChainInStore")
|
||||
procCertFindExtension = modcrypt32.NewProc("CertFindExtension")
|
||||
procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain")
|
||||
procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext")
|
||||
procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain")
|
||||
procCertGetNameStringW = modcrypt32.NewProc("CertGetNameStringW")
|
||||
procCertOpenStore = modcrypt32.NewProc("CertOpenStore")
|
||||
procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW")
|
||||
procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy")
|
||||
procCryptAcquireCertificatePrivateKey = modcrypt32.NewProc("CryptAcquireCertificatePrivateKey")
|
||||
procCryptDecodeObject = modcrypt32.NewProc("CryptDecodeObject")
|
||||
procCryptProtectData = modcrypt32.NewProc("CryptProtectData")
|
||||
procCryptQueryObject = modcrypt32.NewProc("CryptQueryObject")
|
||||
procCryptUnprotectData = modcrypt32.NewProc("CryptUnprotectData")
|
||||
procPFXImportCertStore = modcrypt32.NewProc("PFXImportCertStore")
|
||||
procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
|
||||
procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
|
||||
procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
|
||||
@@ -181,9 +193,12 @@ var (
|
||||
procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
|
||||
procExitProcess = modkernel32.NewProc("ExitProcess")
|
||||
procFindClose = modkernel32.NewProc("FindClose")
|
||||
procFindCloseChangeNotification = modkernel32.NewProc("FindCloseChangeNotification")
|
||||
procFindFirstChangeNotificationW = modkernel32.NewProc("FindFirstChangeNotificationW")
|
||||
procFindFirstFileW = modkernel32.NewProc("FindFirstFileW")
|
||||
procFindFirstVolumeMountPointW = modkernel32.NewProc("FindFirstVolumeMountPointW")
|
||||
procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW")
|
||||
procFindNextChangeNotification = modkernel32.NewProc("FindNextChangeNotification")
|
||||
procFindNextFileW = modkernel32.NewProc("FindNextFileW")
|
||||
procFindNextVolumeMountPointW = modkernel32.NewProc("FindNextVolumeMountPointW")
|
||||
procFindNextVolumeW = modkernel32.NewProc("FindNextVolumeW")
|
||||
@@ -339,10 +354,13 @@ var (
|
||||
procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
|
||||
procShellExecuteW = modshell32.NewProc("ShellExecuteW")
|
||||
procExitWindowsEx = moduser32.NewProc("ExitWindowsEx")
|
||||
procGetShellWindow = moduser32.NewProc("GetShellWindow")
|
||||
procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId")
|
||||
procMessageBoxW = moduser32.NewProc("MessageBoxW")
|
||||
procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
|
||||
procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
|
||||
procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
|
||||
procWinVerifyTrustEx = modwintrust.NewProc("WinVerifyTrustEx")
|
||||
procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
|
||||
procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
|
||||
procWSACleanup = modws2_32.NewProc("WSACleanup")
|
||||
@@ -352,6 +370,7 @@ var (
|
||||
procWSARecvFrom = modws2_32.NewProc("WSARecvFrom")
|
||||
procWSASend = modws2_32.NewProc("WSASend")
|
||||
procWSASendTo = modws2_32.NewProc("WSASendTo")
|
||||
procWSASocketW = modws2_32.NewProc("WSASocketW")
|
||||
procWSAStartup = modws2_32.NewProc("WSAStartup")
|
||||
procbind = modws2_32.NewProc("bind")
|
||||
procclosesocket = modws2_32.NewProc("closesocket")
|
||||
@@ -1180,6 +1199,12 @@ func CertDeleteCertificateFromStore(certContext *CertContext) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) {
|
||||
r0, _, _ := syscall.Syscall(procCertDuplicateCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0)
|
||||
dupContext = (*CertContext)(unsafe.Pointer(r0))
|
||||
return
|
||||
}
|
||||
|
||||
func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {
|
||||
r0, _, e1 := syscall.Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0)
|
||||
context = (*CertContext)(unsafe.Pointer(r0))
|
||||
@@ -1189,6 +1214,30 @@ func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (contex
|
||||
return
|
||||
}
|
||||
|
||||
func CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) {
|
||||
r0, _, e1 := syscall.Syscall6(procCertFindCertificateInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevCertContext)))
|
||||
cert = (*CertContext)(unsafe.Pointer(r0))
|
||||
if cert == nil {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) {
|
||||
r0, _, e1 := syscall.Syscall6(procCertFindChainInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevChainContext)))
|
||||
certchain = (*CertChainContext)(unsafe.Pointer(r0))
|
||||
if certchain == nil {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) {
|
||||
r0, _, _ := syscall.Syscall(procCertFindExtension.Addr(), 3, uintptr(unsafe.Pointer(objId)), uintptr(countExtensions), uintptr(unsafe.Pointer(extensions)))
|
||||
ret = (*CertExtension)(unsafe.Pointer(r0))
|
||||
return
|
||||
}
|
||||
|
||||
func CertFreeCertificateChain(ctx *CertChainContext) {
|
||||
syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
|
||||
return
|
||||
@@ -1210,6 +1259,12 @@ func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, a
|
||||
return
|
||||
}
|
||||
|
||||
func CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, 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
|
||||
}
|
||||
|
||||
func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {
|
||||
r0, _, e1 := syscall.Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0)
|
||||
handle = Handle(r0)
|
||||
@@ -1236,6 +1291,60 @@ func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext
|
||||
return
|
||||
}
|
||||
|
||||
func CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) {
|
||||
var _p0 uint32
|
||||
if *callerFreeProvOrNCryptKey {
|
||||
_p0 = 1
|
||||
}
|
||||
r1, _, e1 := syscall.Syscall6(procCryptAcquireCertificatePrivateKey.Addr(), 6, uintptr(unsafe.Pointer(cert)), uintptr(flags), uintptr(parameters), uintptr(unsafe.Pointer(cryptProvOrNCryptKey)), uintptr(unsafe.Pointer(keySpec)), uintptr(unsafe.Pointer(&_p0)))
|
||||
*callerFreeProvOrNCryptKey = _p0 != 0
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall9(procCryptDecodeObject.Addr(), 7, uintptr(encodingType), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(encodedBytes)), uintptr(lenEncodedBytes), uintptr(flags), uintptr(decoded), uintptr(unsafe.Pointer(decodedLen)), 0, 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {
|
||||
r1, _, e1 := syscall.Syscall9(procCryptProtectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) {
|
||||
r1, _, e1 := syscall.Syscall12(procCryptQueryObject.Addr(), 11, uintptr(objectType), uintptr(object), uintptr(expectedContentTypeFlags), uintptr(expectedFormatTypeFlags), uintptr(flags), uintptr(unsafe.Pointer(msgAndCertEncodingType)), uintptr(unsafe.Pointer(contentType)), uintptr(unsafe.Pointer(formatType)), uintptr(unsafe.Pointer(certStore)), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(context)), 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {
|
||||
r1, _, e1 := syscall.Syscall9(procCryptUnprotectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) {
|
||||
r0, _, e1 := syscall.Syscall(procPFXImportCertStore.Addr(), 3, uintptr(unsafe.Pointer(pfx)), uintptr(unsafe.Pointer(password)), uintptr(flags))
|
||||
store = Handle(r0)
|
||||
if store == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) {
|
||||
r0, _, _ := syscall.Syscall(procDnsNameCompare_W.Addr(), 2, uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)), 0)
|
||||
same = r0 != 0
|
||||
@@ -1372,7 +1481,7 @@ func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr
|
||||
return
|
||||
}
|
||||
|
||||
func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) {
|
||||
func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error) {
|
||||
r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0)
|
||||
handle = Handle(r0)
|
||||
if handle == 0 {
|
||||
@@ -1506,6 +1615,36 @@ func FindClose(handle Handle) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func FindCloseChangeNotification(handle Handle) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procFindCloseChangeNotification.Addr(), 1, uintptr(handle), 0, 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) {
|
||||
var _p0 *uint16
|
||||
_p0, err = syscall.UTF16PtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return _FindFirstChangeNotification(_p0, watchSubtree, notifyFilter)
|
||||
}
|
||||
|
||||
func _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) {
|
||||
var _p1 uint32
|
||||
if watchSubtree {
|
||||
_p1 = 1
|
||||
}
|
||||
r0, _, e1 := syscall.Syscall(procFindFirstChangeNotificationW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(_p1), uintptr(notifyFilter))
|
||||
handle = Handle(r0)
|
||||
if handle == InvalidHandle {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
|
||||
r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
|
||||
handle = Handle(r0)
|
||||
@@ -1533,6 +1672,14 @@ func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, er
|
||||
return
|
||||
}
|
||||
|
||||
func FindNextChangeNotification(handle Handle) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procFindNextChangeNotification.Addr(), 1, uintptr(handle), 0, 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func findNextFile1(handle Handle, data *win32finddata1) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
|
||||
if r1 == 0 {
|
||||
@@ -1920,7 +2067,7 @@ func GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintpt
|
||||
return
|
||||
}
|
||||
|
||||
func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) {
|
||||
func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -2252,7 +2399,7 @@ func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (hand
|
||||
return
|
||||
}
|
||||
|
||||
func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) {
|
||||
func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error) {
|
||||
r1, _, e1 := syscall.Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -2879,7 +3026,22 @@ func ExitWindowsEx(flags uint32, reason uint32) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func MessageBox(hwnd Handle, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
|
||||
func GetShellWindow() (shellWindow HWND) {
|
||||
r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0)
|
||||
shellWindow = HWND(r0)
|
||||
return
|
||||
}
|
||||
|
||||
func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
|
||||
r0, _, e1 := syscall.Syscall(procGetWindowThreadProcessId.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(pid)), 0)
|
||||
tid = uint32(r0)
|
||||
if tid == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
|
||||
r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
|
||||
ret = int32(r0)
|
||||
if ret == 0 {
|
||||
@@ -2916,6 +3078,14 @@ func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) {
|
||||
r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))
|
||||
if r0 != 0 {
|
||||
ret = syscall.Errno(r0)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func FreeAddrInfoW(addrinfo *AddrinfoW) {
|
||||
syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0)
|
||||
return
|
||||
@@ -2986,6 +3156,15 @@ func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32
|
||||
return
|
||||
}
|
||||
|
||||
func WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) {
|
||||
r0, _, e1 := syscall.Syscall6(procWSASocketW.Addr(), 6, uintptr(af), uintptr(typ), uintptr(protocol), uintptr(unsafe.Pointer(protoInfo)), uintptr(group), uintptr(flags))
|
||||
handle = Handle(r0)
|
||||
if handle == InvalidHandle {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
|
||||
r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0)
|
||||
if r0 != 0 {
|
||||
|
Reference in New Issue
Block a user