aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-12-09 22:46:07 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-12-10 11:46:07 +0800
commit77c94270bc9c8dfb605a8a8e0b7a4e979dcb153f (patch)
tree27e1d117e4ef05ea67741afca9932b7b282bd3a8 /tests
parent0242c08ee3e8324fdd9f571b7cc094d2d99c6411 (diff)
downloadcryptography-77c94270bc9c8dfb605a8a8e0b7a4e979dcb153f.tar.gz
cryptography-77c94270bc9c8dfb605a8a8e0b7a4e979dcb153f.tar.bz2
cryptography-77c94270bc9c8dfb605a8a8e0b7a4e979dcb153f.zip
update the ec tests to not emit 3000 warnings (#4048)
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/primitives/test_ec.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/hazmat/primitives/test_ec.py b/tests/hazmat/primitives/test_ec.py
index 4f08f184..02b1cdc6 100644
--- a/tests/hazmat/primitives/test_ec.py
+++ b/tests/hazmat/primitives/test_ec.py
@@ -514,12 +514,11 @@ class TestECDSAVectors(object):
signature = encode_dss_signature(vector['r'], vector['s'])
- verifier = key.verifier(
+ key.verify(
signature,
+ vector['message'],
ec.ECDSA(hash_type())
)
- verifier.update(vector['message'])
- verifier.verify()
@pytest.mark.parametrize(
"vector",
@@ -543,17 +542,19 @@ class TestECDSAVectors(object):
signature = encode_dss_signature(vector['r'], vector['s'])
- verifier = key.verifier(
- signature,
- ec.ECDSA(hash_type())
- )
- verifier.update(vector['message'])
-
if vector["fail"] is True:
with pytest.raises(exceptions.InvalidSignature):
- verifier.verify()
+ key.verify(
+ signature,
+ vector['message'],
+ ec.ECDSA(hash_type())
+ )
else:
- verifier.verify()
+ key.verify(
+ signature,
+ vector['message'],
+ ec.ECDSA(hash_type())
+ )
def test_sign(self, backend):
_skip_curve_unsupported(backend, ec.SECP256R1())