aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_dsa.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-12-08 11:01:00 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-12-08 11:01:00 -0800
commit68416c33d3868465f2485e4facae84900ad2c632 (patch)
tree2c6923033e22467c1e750f98afe237323fcd617e /tests/hazmat/primitives/test_dsa.py
parent9e507d2ab62cec4c9b63b08a6f5ae8656106a162 (diff)
parentac4d5f2249de136cbfef72aa650dcc4703b67851 (diff)
downloadcryptography-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_dsa.py')
-rw-r--r--tests/hazmat/primitives/test_dsa.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/hazmat/primitives/test_dsa.py b/tests/hazmat/primitives/test_dsa.py
index 6411b7f9..f818f73b 100644
--- a/tests/hazmat/primitives/test_dsa.py
+++ b/tests/hazmat/primitives/test_dsa.py
@@ -12,14 +12,17 @@ from cryptography.exceptions import AlreadyFinalized, InvalidSignature
from cryptography.hazmat.backends.interfaces import DSABackend
from cryptography.hazmat.primitives import hashes, interfaces
from cryptography.hazmat.primitives.asymmetric import dsa
+from cryptography.hazmat.primitives.asymmetric.utils import (
+ encode_rfc6979_signature
+)
from cryptography.utils import bit_length
from .fixtures_dsa import (
DSA_KEY_1024, DSA_KEY_2048, DSA_KEY_3072
)
from ...utils import (
- der_encode_dsa_signature, load_fips_dsa_key_pair_vectors,
- load_fips_dsa_sig_vectors, load_vectors_from_file,
+ load_fips_dsa_key_pair_vectors, load_fips_dsa_sig_vectors,
+ load_vectors_from_file,
)
@@ -557,7 +560,7 @@ class TestDSAVerification(object):
),
y=vector['y']
).public_key(backend)
- sig = der_encode_dsa_signature(vector['r'], vector['s'])
+ sig = encode_rfc6979_signature(vector['r'], vector['s'])
verifier = public_key.verifier(sig, algorithm())
verifier.update(vector['msg'])
if vector['result'] == "F":