disable keys in link protocol traffic, since these are already known, *breaks backwards compat*

This commit is contained in:
Arceliar 2018-02-17 20:30:59 -06:00
parent c0579024c0
commit 25f00c1c7a
2 changed files with 16 additions and 16 deletions

View file

@ -380,16 +380,16 @@ func (p *wire_protoTrafficPacket) decode(bs []byte) bool {
}
type wire_linkProtoTrafficPacket struct {
toKey boxPubKey
fromKey boxPubKey
//toKey boxPubKey
//fromKey boxPubKey
nonce boxNonce
payload []byte
}
func (p *wire_linkProtoTrafficPacket) encode() []byte {
bs := wire_encode_uint64(wire_LinkProtocolTraffic)
bs = append(bs, p.toKey[:]...)
bs = append(bs, p.fromKey[:]...)
//bs = append(bs, p.toKey[:]...)
//bs = append(bs, p.fromKey[:]...)
bs = append(bs, p.nonce[:]...)
bs = append(bs, p.payload...)
return bs
@ -402,10 +402,10 @@ func (p *wire_linkProtoTrafficPacket) decode(bs []byte) bool {
return false
case pType != wire_LinkProtocolTraffic:
return false
case !wire_chop_slice(p.toKey[:], &bs):
return false
case !wire_chop_slice(p.fromKey[:], &bs):
return false
//case !wire_chop_slice(p.toKey[:], &bs):
// return false
//case !wire_chop_slice(p.fromKey[:], &bs):
// return false
case !wire_chop_slice(p.nonce[:], &bs):
return false
}