implement validateSignature

This commit is contained in:
vyzo 2018-08-26 13:13:12 +03:00
parent 64aab3485a
commit 7c508b4fba
2 changed files with 19 additions and 0 deletions

View File

@ -496,6 +496,12 @@ func (p *PubSub) validate(vals []*topicVal, src peer.ID, msg *Message) {
}
func (p *PubSub) validateSignature(msg *Message) bool {
err := verifyMessageSignature(msg.Message)
if err != nil {
log.Debugf("signature verification error: %s", err.Error())
return false
}
return true
}

13
sign.go Normal file
View File

@ -0,0 +1,13 @@
package floodsub
import (
pb "github.com/libp2p/go-floodsub/pb"
)
func verifyMessageSignature(m *pb.Message) error {
return nil
}
func signMessage(m *pb.Message) {
}