ref: Setup messages should always be exchanged by VIFs and should be async.
This change also removes support for RPCVersion5.
MultiPart: 2/2
Change-Id: Ie8d3cb30170ca8fac58594197ad0f28108957e3c
diff --git a/profiles/internal/rpc/stream/vc/auth.go b/profiles/internal/rpc/stream/vc/auth.go
index b74a351..e19d10f 100644
--- a/profiles/internal/rpc/stream/vc/auth.go
+++ b/profiles/internal/rpc/stream/vc/auth.go
@@ -110,10 +110,8 @@
if err := enc.Encode(b); err != nil {
return verror.New(stream.ErrNetwork, nil, verror.New(errVomEncodeBlessing, nil, err))
}
- if v >= version.RPCVersion5 {
- if err := enc.Encode(discharges); err != nil {
- return verror.New(stream.ErrNetwork, nil, verror.New(errVomEncodeBlessing, nil, err))
- }
+ if err := enc.Encode(discharges); err != nil {
+ return verror.New(stream.ErrNetwork, nil, verror.New(errVomEncodeBlessing, nil, err))
}
msg, err := crypter.Encrypt(iobuf.NewSlice(buf.Bytes()))
if err != nil {
@@ -161,10 +159,8 @@
return noBlessings, nil, verror.New(stream.ErrNetwork, nil, err)
}
var discharges []security.Discharge
- if v >= version.RPCVersion5 {
- if err := dec.Decode(&discharges); err != nil {
- return noBlessings, nil, verror.New(stream.ErrNetwork, nil, err)
- }
+ if err := dec.Decode(&discharges); err != nil {
+ return noBlessings, nil, verror.New(stream.ErrNetwork, nil, err)
}
if !sig.Verify(blessings.PublicKey(), append(tag, crypter.ChannelBinding()...)) {
return noBlessings, nil, verror.New(stream.ErrSecurity, nil, verror.New(errInvalidSignatureInMessage, nil))