aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
authorgluk256 <gluk256@gmail.com>2019-02-09 00:05:10 +0800
committerRafael Matias <rafael@skyle.net>2019-02-19 20:09:10 +0800
commit8d8ddea1a36bfb50f6378650b6a4249fb1b0f9b4 (patch)
tree6077683d5e1edb1aa62b05caa01fd06bfc8f8452 /swarm
parent068725c5b09a49b32850a9c10707a86f07fde962 (diff)
downloaddexon-8d8ddea1a36bfb50f6378650b6a4249fb1b0f9b4.tar.gz
dexon-8d8ddea1a36bfb50f6378650b6a4249fb1b0f9b4.tar.zst
dexon-8d8ddea1a36bfb50f6378650b6a4249fb1b0f9b4.zip
swarm/pss: transition to whisper v6 (#19023)
(cherry picked from commit cde02e017ef2fb254f9b91888f4a14645c24890a)
Diffstat (limited to 'swarm')
-rw-r--r--swarm/pss/client/client_test.go2
-rw-r--r--swarm/pss/forwarding_test.go2
-rw-r--r--swarm/pss/notify/notify_test.go2
-rw-r--r--swarm/pss/pss.go6
-rw-r--r--swarm/pss/pss_test.go2
-rw-r--r--swarm/pss/types.go2
6 files changed, 8 insertions, 8 deletions
diff --git a/swarm/pss/client/client_test.go b/swarm/pss/client/client_test.go
index 0d6788d67..1c6f2e522 100644
--- a/swarm/pss/client/client_test.go
+++ b/swarm/pss/client/client_test.go
@@ -38,7 +38,7 @@ import (
"github.com/ethereum/go-ethereum/swarm/network"
"github.com/ethereum/go-ethereum/swarm/pss"
"github.com/ethereum/go-ethereum/swarm/state"
- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
+ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
)
type protoCtrl struct {
diff --git a/swarm/pss/forwarding_test.go b/swarm/pss/forwarding_test.go
index 250297794..746d4dc40 100644
--- a/swarm/pss/forwarding_test.go
+++ b/swarm/pss/forwarding_test.go
@@ -12,7 +12,7 @@ import (
"github.com/ethereum/go-ethereum/p2p/protocols"
"github.com/ethereum/go-ethereum/swarm/network"
"github.com/ethereum/go-ethereum/swarm/pot"
- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
+ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
)
type testCase struct {
diff --git a/swarm/pss/notify/notify_test.go b/swarm/pss/notify/notify_test.go
index 5c29f68e0..bd9b2a4c1 100644
--- a/swarm/pss/notify/notify_test.go
+++ b/swarm/pss/notify/notify_test.go
@@ -19,7 +19,7 @@ import (
"github.com/ethereum/go-ethereum/swarm/network"
"github.com/ethereum/go-ethereum/swarm/pss"
"github.com/ethereum/go-ethereum/swarm/state"
- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
+ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
)
var (
diff --git a/swarm/pss/pss.go b/swarm/pss/pss.go
index bee64b0df..4d5e4a61b 100644
--- a/swarm/pss/pss.go
+++ b/swarm/pss/pss.go
@@ -38,7 +38,7 @@ import (
"github.com/ethereum/go-ethereum/swarm/network"
"github.com/ethereum/go-ethereum/swarm/pot"
"github.com/ethereum/go-ethereum/swarm/storage"
- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
+ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
"golang.org/x/crypto/sha3"
)
@@ -666,7 +666,7 @@ func (p *Pss) processSym(envelope *whisper.Envelope) (*whisper.ReceivedMessage,
if err != nil {
continue
}
- if !recvmsg.Validate() {
+ if !recvmsg.ValidateAndParse() {
return nil, "", nil, fmt.Errorf("symmetrically encrypted message has invalid signature or is corrupt")
}
p.symKeyPoolMu.Lock()
@@ -693,7 +693,7 @@ func (p *Pss) processAsym(envelope *whisper.Envelope) (*whisper.ReceivedMessage,
return nil, "", nil, fmt.Errorf("could not decrypt message: %s", err)
}
// check signature (if signed), strip padding
- if !recvmsg.Validate() {
+ if !recvmsg.ValidateAndParse() {
return nil, "", nil, fmt.Errorf("invalid message")
}
pubkeyid := common.ToHex(crypto.FromECDSAPub(recvmsg.Src))
diff --git a/swarm/pss/pss_test.go b/swarm/pss/pss_test.go
index 0fb87be2c..675b4cfcd 100644
--- a/swarm/pss/pss_test.go
+++ b/swarm/pss/pss_test.go
@@ -50,7 +50,7 @@ import (
"github.com/ethereum/go-ethereum/swarm/network"
"github.com/ethereum/go-ethereum/swarm/pot"
"github.com/ethereum/go-ethereum/swarm/state"
- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
+ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
)
var (
diff --git a/swarm/pss/types.go b/swarm/pss/types.go
index ba963067c..2ce1f5cfb 100644
--- a/swarm/pss/types.go
+++ b/swarm/pss/types.go
@@ -26,7 +26,7 @@ import (
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/swarm/storage"
- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
+ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
)
const (