func (p *provisionee) DidCounterSign(_ context.Context, sig []byte) (err error) {
	err = p.arg.Provisionee.HandleDidCounterSign(sig)
	p.done <- err
	return err
}
DidCounterSign is called via the RPC server interface by the remote client.
It in turn delegates the work to the passed in Provisionee interface,
calling HandleDidCounterSign()
package kex2
import (
	"time"
	keybase1 "github.com/keybase/client/go/protocol"
	rpc "github.com/keybase/go-framed-msgpack-rpc"
	"golang.org/x/net/context"
)
type provisionee struct {
	baseDevice
	arg  ProvisioneeArg
	done chan error
	server       *rpc.Server
	serverDoneCh <-chan struct{}
}
type Provisionee interface {
	GetLogFactory() rpc.LogFactory
	HandleHello(keybase1.HelloArg) (keybase1.HelloRes, error)
	HandleDidCounterSign([]byte) error
}
type ProvisioneeArg struct {
	KexBaseArg
	Provisionee Provisionee
}
func newProvisionee(arg ProvisioneeArg) *provisionee {
	ret := &provisionee{
		baseDevice: baseDevice{
			start: make(chan struct{}),
		},
		arg:  arg,
		done: make(chan error),
	}
	return ret
}
func RunProvisionee(arg ProvisioneeArg) error {
	p := newProvisionee(arg)
	return p.run()
}
func (p *provisionee) Hello(_ context.Context, arg keybase1.HelloArg) (res keybase1.HelloRes, err error) {
	close(p.start)
	res, err = p.arg.Provisionee.HandleHello(arg)
	if err != nil {
		p.done <- err
	}
	return res, err
}