diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-12-08 11:01:00 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-12-08 11:01:00 -0800 |
commit | 68416c33d3868465f2485e4facae84900ad2c632 (patch) | |
tree | 2c6923033e22467c1e750f98afe237323fcd617e /tests/hazmat/primitives/test_ec.py | |
parent | 9e507d2ab62cec4c9b63b08a6f5ae8656106a162 (diff) | |
parent | ac4d5f2249de136cbfef72aa650dcc4703b67851 (diff) | |
download | cryptography-68416c33d3868465f2485e4facae84900ad2c632.tar.gz cryptography-68416c33d3868465f2485e4facae84900ad2c632.tar.bz2 cryptography-68416c33d3868465f2485e4facae84900ad2c632.zip |
Merge pull request #1502 from reaperhulk/fix-1285
Support decoding RFC 6979 signatures to (r, s)
Diffstat (limited to 'tests/hazmat/primitives/test_ec.py')
-rw-r--r-- | tests/hazmat/primitives/test_ec.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/hazmat/primitives/test_ec.py b/tests/hazmat/primitives/test_ec.py index 3080a6c2..a006f01f 100644 --- a/tests/hazmat/primitives/test_ec.py +++ b/tests/hazmat/primitives/test_ec.py @@ -13,11 +13,13 @@ from cryptography import exceptions, utils from cryptography.hazmat.backends.interfaces import EllipticCurveBackend from cryptography.hazmat.primitives import hashes, interfaces from cryptography.hazmat.primitives.asymmetric import ec +from cryptography.hazmat.primitives.asymmetric.utils import ( + encode_rfc6979_signature +) from ...utils import ( - der_encode_dsa_signature, load_fips_ecdsa_key_pair_vectors, - load_fips_ecdsa_signing_vectors, load_vectors_from_file, - raises_unsupported_algorithm + load_fips_ecdsa_key_pair_vectors, load_fips_ecdsa_signing_vectors, + load_vectors_from_file, raises_unsupported_algorithm ) _HASH_TYPES = { @@ -305,10 +307,7 @@ class TestECDSAVectors(object): curve_type() ).public_key(backend) - signature = der_encode_dsa_signature( - vector['r'], - vector['s'] - ) + signature = encode_rfc6979_signature(vector['r'], vector['s']) verifier = key.verifier( signature, @@ -337,10 +336,7 @@ class TestECDSAVectors(object): curve_type() ).public_key(backend) - signature = der_encode_dsa_signature( - vector['r'], - vector['s'] - ) + signature = encode_rfc6979_signature(vector['r'], vector['s']) verifier = key.verifier( signature, |