diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-02 20:00:25 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-02 20:00:25 +0800 |
commit | e2d1d832efe0623539c9d37ca8aee17d44e47067 (patch) | |
tree | ae681ba7255a293bf3edc02c30da207bae9ac96a /whisper/envelope.go | |
parent | d336e24dcec2bb2cb89fff76302882aa82124dc8 (diff) | |
download | go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.tar.gz go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.tar.zst go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.zip |
added nil check
Diffstat (limited to 'whisper/envelope.go')
-rw-r--r-- | whisper/envelope.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/whisper/envelope.go b/whisper/envelope.go index 066e20f6a..9d28dfa6b 100644 --- a/whisper/envelope.go +++ b/whisper/envelope.go @@ -79,6 +79,7 @@ func (self *Envelope) Open(prv *ecdsa.PrivateKey) (msg *Message, err error) { if prv != nil { message.Payload, err = crypto.Decrypt(prv, payload) switch err { + case nil: // OK case ecies.ErrInvalidPublicKey: // Payload isn't encrypted message.Payload = payload return &message, err |