remove sigManager, it seems safer to just burn the CPU than to store a map of strings of potentially arbitrary length

This commit is contained in:
Arceliar 2018-11-25 13:06:54 -06:00
parent 4e156bd4f7
commit 9046dbde4f
4 changed files with 1 additions and 99 deletions

View file

@ -316,7 +316,7 @@ func (p *peer) handleSwitchMsg(packet []byte) {
sigMsg.Hops = msg.Hops[:idx]
loc.coords = append(loc.coords, hop.Port)
bs := getBytesForSig(&hop.Next, &sigMsg)
if !p.core.sigs.check(&prevKey, &hop.Sig, bs) {
if !verify(&prevKey, bs, &hop.Sig) {
p.core.peers.removePeer(p.port)
}
prevKey = hop.Next