mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-08 07:43:11 +00:00
implement validateSignature
This commit is contained in:
parent
64aab3485a
commit
7c508b4fba
@ -496,6 +496,12 @@ func (p *PubSub) validate(vals []*topicVal, src peer.ID, msg *Message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PubSub) validateSignature(msg *Message) bool {
|
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
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user