vendor: upgrade ssh-agent dependency
This commit is contained in:
parent
c98f2087fb
commit
377077c060
2
go.mod
2
go.mod
|
@ -126,7 +126,7 @@ require (
|
|||
github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 // indirect
|
||||
github.com/ulikunitz/xz v0.5.4 // indirect
|
||||
github.com/vmihailenco/msgpack v4.0.0+incompatible // indirect
|
||||
github.com/xanzy/ssh-agent v0.1.0
|
||||
github.com/xanzy/ssh-agent v0.2.0
|
||||
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 // indirect
|
||||
github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557
|
||||
github.com/zclconf/go-cty v0.0.0-20181017232614-01c5aba823a6
|
||||
|
|
4
go.sum
4
go.sum
|
@ -295,8 +295,8 @@ github.com/vmihailenco/msgpack v3.3.3+incompatible h1:wapg9xDUZDzGCNFlwc5SqI1rvc
|
|||
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
|
||||
github.com/vmihailenco/msgpack v4.0.0+incompatible h1:R/ftCULcY/r0SLpalySUSd8QV4fVABi/h0D/IjlYJzg=
|
||||
github.com/vmihailenco/msgpack v4.0.0+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
|
||||
github.com/xanzy/ssh-agent v0.1.0 h1:lOhdXLxtmYjaHc76ZtNmJWPg948y/RnT+3N3cvKWFzY=
|
||||
github.com/xanzy/ssh-agent v0.1.0/go.mod h1:0NyE30eGUDliuLEHJgYte/zncp2zdTStcOnWhgSqHD8=
|
||||
github.com/xanzy/ssh-agent v0.2.0 h1:Adglfbi5p9Z0BmK2oKU9nTG+zKfniSfnaMYB+ULd+Ro=
|
||||
github.com/xanzy/ssh-agent v0.2.0/go.mod h1:0NyE30eGUDliuLEHJgYte/zncp2zdTStcOnWhgSqHD8=
|
||||
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 h1:MPPkRncZLN9Kh4MEFmbnK4h3BD7AUmskWv2+EeZJCCs=
|
||||
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557 h1:Jpn2j6wHkC9wJv5iMfJhKqrZJx3TahFx+7sbZ7zQdxs=
|
||||
|
|
|
@ -29,8 +29,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"sync"
|
||||
. "syscall"
|
||||
. "unsafe"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// Maximum size of message can be sent to pageant
|
||||
|
@ -53,7 +53,7 @@ const (
|
|||
type copyData struct {
|
||||
dwData uintptr
|
||||
cbData uint32
|
||||
lpData Pointer
|
||||
lpData unsafe.Pointer
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -65,7 +65,7 @@ var (
|
|||
)
|
||||
|
||||
func winAPI(dllName, funcName string) func(...uintptr) (uintptr, uintptr, error) {
|
||||
proc := MustLoadDLL(dllName).MustFindProc(funcName)
|
||||
proc := syscall.MustLoadDLL(dllName).MustFindProc(funcName)
|
||||
return func(a ...uintptr) (uintptr, uintptr, error) { return proc.Call(a...) }
|
||||
}
|
||||
|
||||
|
@ -96,21 +96,21 @@ func query(msg []byte) ([]byte, error) {
|
|||
|
||||
thID, _, _ := winGetCurrentThreadID()
|
||||
mapName := fmt.Sprintf("PageantRequest%08x", thID)
|
||||
pMapName, _ := UTF16PtrFromString(mapName)
|
||||
pMapName, _ := syscall.UTF16PtrFromString(mapName)
|
||||
|
||||
mmap, err := CreateFileMapping(InvalidHandle, nil, PAGE_READWRITE, 0, MaxMessageLen+4, pMapName)
|
||||
mmap, err := syscall.CreateFileMapping(syscall.InvalidHandle, nil, syscall.PAGE_READWRITE, 0, MaxMessageLen+4, pMapName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer CloseHandle(mmap)
|
||||
defer syscall.CloseHandle(mmap)
|
||||
|
||||
ptr, err := MapViewOfFile(mmap, FILE_MAP_WRITE, 0, 0, 0)
|
||||
ptr, err := syscall.MapViewOfFile(mmap, syscall.FILE_MAP_WRITE, 0, 0, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer UnmapViewOfFile(ptr)
|
||||
defer syscall.UnmapViewOfFile(ptr)
|
||||
|
||||
mmSlice := (*(*[MaxMessageLen]byte)(Pointer(ptr)))[:]
|
||||
mmSlice := (*(*[MaxMessageLen]byte)(unsafe.Pointer(ptr)))[:]
|
||||
|
||||
copy(mmSlice, msg)
|
||||
|
||||
|
@ -119,10 +119,10 @@ func query(msg []byte) ([]byte, error) {
|
|||
cds := copyData{
|
||||
dwData: agentCopydataID,
|
||||
cbData: uint32(len(mapNameBytesZ)),
|
||||
lpData: Pointer(&(mapNameBytesZ[0])),
|
||||
lpData: unsafe.Pointer(&(mapNameBytesZ[0])),
|
||||
}
|
||||
|
||||
resp, _, _ := winSendMessage(paWin, wmCopydata, 0, uintptr(Pointer(&cds)))
|
||||
resp, _, _ := winSendMessage(paWin, wmCopydata, 0, uintptr(unsafe.Pointer(&cds)))
|
||||
|
||||
if resp == 0 {
|
||||
return nil, ErrSendMessage
|
||||
|
@ -140,7 +140,7 @@ func query(msg []byte) ([]byte, error) {
|
|||
}
|
||||
|
||||
func pageantWindow() uintptr {
|
||||
nameP, _ := UTF16PtrFromString("Pageant")
|
||||
h, _, _ := winFindWindow(uintptr(Pointer(nameP)), uintptr(Pointer(nameP)))
|
||||
nameP, _ := syscall.UTF16PtrFromString("Pageant")
|
||||
h, _, _ := winFindWindow(uintptr(unsafe.Pointer(nameP)), uintptr(unsafe.Pointer(nameP)))
|
||||
return h
|
||||
}
|
||||
|
|
|
@ -448,7 +448,7 @@ github.com/ulikunitz/xz/internal/hash
|
|||
# github.com/vmihailenco/msgpack v4.0.0+incompatible
|
||||
github.com/vmihailenco/msgpack
|
||||
github.com/vmihailenco/msgpack/codes
|
||||
# github.com/xanzy/ssh-agent v0.1.0
|
||||
# github.com/xanzy/ssh-agent v0.2.0
|
||||
github.com/xanzy/ssh-agent
|
||||
# github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557
|
||||
github.com/xlab/treeprint
|
||||
|
|
Loading…
Reference in New Issue