diff --git a/pubsub.go b/pubsub.go index 0292ab9..e44c467 100644 --- a/pubsub.go +++ b/pubsub.go @@ -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 } diff --git a/sign.go b/sign.go new file mode 100644 index 0000000..14eb2cc --- /dev/null +++ b/sign.go @@ -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) { + +}