aboutsummaryrefslogtreecommitdiff
path: root/openpgp
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo@golang.org>2018-05-08 20:42:30 -0400
committerFilippo Valsorda <filippo@golang.org>2018-05-09 02:20:26 +0000
commit21052ae46654ecf18dfdba0f7c12701a1e2b3164 (patch)
tree9466b7b6e862eb76b2a7700fa62129a5f2367f9f /openpgp
parent4ec37c66abab2c7e02ae775328b2ff001c3f025a (diff)
downloadgo-x-crypto-21052ae46654ecf18dfdba0f7c12701a1e2b3164.tar.xz
openpgp: fix vet issue in tests
https://golang.org/cl/111416 made vet spot this new issue by recognizing the len() call as side-effect free: redundant or: md.IsSymmetricallyEncrypted || md.IsSymmetricallyEncrypted Change-Id: I8b72eedb458365a50e14d5eec35b972ee61efb1f Reviewed-on: https://go-review.googlesource.com/112255 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org>
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/read_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/read_test.go b/openpgp/read_test.go
index 1fbfbac..f5bba30 100644
--- a/openpgp/read_test.go
+++ b/openpgp/read_test.go
@@ -124,7 +124,7 @@ func checkSignedMessage(t *testing.T, signedHex, expected string) {
return
}
- if !md.IsSigned || md.SignedByKeyId != 0xa34d7e18c20c31bb || md.SignedBy == nil || md.IsEncrypted || md.IsSymmetricallyEncrypted || len(md.EncryptedToKeyIds) != 0 || md.IsSymmetricallyEncrypted {
+ if !md.IsSigned || md.SignedByKeyId != 0xa34d7e18c20c31bb || md.SignedBy == nil || md.IsEncrypted || md.IsSymmetricallyEncrypted || len(md.EncryptedToKeyIds) != 0 || md.DecryptedWith != (Key{}) {
t.Errorf("bad MessageDetails: %#v", md)
}