summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-07-10 11:11:06 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-07-11 12:52:04 -0700
commit20f534dde5f0f7382de43cf4d7853f29666b865d (patch)
tree84d7807bcb4ceb7f9f539e18c52e9d51edfe8042 /tests
parent9e0d05457552250d612f041bdb7a26bcf61678ab (diff)
crypto: Fix error handling of signed messages
gpgme.Context.verify doesn't raise an exception, instead it attaches the error as an attribute of the return value. This means that we've been returning that a signature is valid even when it isn't. This patch checks the attribute instead of try/excepting. Because there is a second bug (fixed in the next patch) signature verification will always fail with this patch.
Diffstat (limited to 'tests')
-rw-r--r--tests/crypto_test.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/crypto_test.py b/tests/crypto_test.py
index 7afb7a93..51cb48ba 100644
--- a/tests/crypto_test.py
+++ b/tests/crypto_test.py
@@ -88,7 +88,6 @@ class TestSignature(utilities.TestCaseClassCleanup):
except GPGProblem:
raise AssertionError
- @unittest.expectedFailure
def test_verify_signature_bad(self):
to_sign = "this is some text.\nIt's something\n."
similar = "this is some text.\r\n.It's something\r\n."