Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ module github.com/buptczq/WinCryptSSHAgent
go 1.14

require (
github.com/Microsoft/go-winio v0.4.16
github.com/Microsoft/go-winio v0.6.2
github.com/bi-zone/wmi v1.1.4
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa
github.com/hattya/go.notify v0.0.0-20200507123844-18670158b53e
github.com/linuxkit/virtsock v0.0.0-20180830132707-8e79449dea07
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
golang.org/x/sys v0.0.0-20210223212115-eede4237b368
golang.org/x/crypto v0.11.0
golang.org/x/sys v0.10.0
)

replace github.com/hattya/go.notify v0.0.0-20200507123844-18670158b53e => github.com/buptczq/go.notify v0.0.0-20210108030838-37adc71f67d9

replace github.com/Microsoft/go-winio v0.4.16 => github.com/buptczq/go-winio v0.4.16-1
// replace github.com/Microsoft/go-winio v0.4.16 => github.com/buptczq/go-winio v0.4.16-1
12 changes: 4 additions & 8 deletions utils/hyperv.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package utils

import (
"net"
"context"

"github.com/Microsoft/go-winio"
"github.com/linuxkit/virtsock/pkg/hvsock"
)

const (
Expand All @@ -15,14 +15,10 @@ const (
var HyperVServiceGUID = winio.VsockServiceID(servicePort)

func ConnectHyperV() (net.Conn, error) {
svcid, err := hvsock.GUIDFromString(HyperVServiceGUID.String())
if err != nil {
return nil, err
}
addr := winio.HvsockAddr{VMID: winio.HvsockGUIDParent(), ServiceID: HyperVServiceGUID}

// use go-winio when this issue resolved.
// see: https://github.com/microsoft/go-winio/issues/198
conn, err := hvsock.Dial(hvsock.Addr{VMID: hvsock.GUIDParent, ServiceID: svcid})
// would it better to pass context from upper action ?
conn, err := winio.Dial(context.Background(), &addr)
if err != nil {
return nil, err
}
Expand Down