aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-30 12:14:48 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-30 12:14:48 -0500
commit14951f4252814c0cfcde5db05b4af12e93f570a9 (patch)
treed33648e59fb51b8af16f7d4a913280db793bf17e /tests/test_utils.py
parentd0dc6a36a5747208c7a5ced15521fef033ce7880 (diff)
downloadcryptography-14951f4252814c0cfcde5db05b4af12e93f570a9.tar.gz
cryptography-14951f4252814c0cfcde5db05b4af12e93f570a9.tar.bz2
cryptography-14951f4252814c0cfcde5db05b4af12e93f570a9.zip
rename dss_sig_value -> der_encode_dsa_signature
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index ae9f6928..e454cc20 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -27,7 +27,7 @@ from cryptography.exceptions import UnsupportedAlgorithm, _Reasons
import cryptography_vectors
from .utils import (
- check_backend_support, check_for_iface, dss_sig_value,
+ check_backend_support, check_for_iface, der_encode_dsa_signature,
load_cryptrec_vectors, load_fips_dsa_key_pair_vectors,
load_fips_dsa_sig_vectors, load_fips_ecdsa_key_pair_vectors,
load_fips_ecdsa_signing_vectors, load_hash_vectors, load_nist_vectors,
@@ -125,18 +125,20 @@ def test_check_backend_support_no_backend():
check_backend_support(item)
-def test_dss_sig_value():
- sig = dss_sig_value(1, 1)
+def test_der_encode_dsa_signature_values():
+ sig = der_encode_dsa_signature(1, 1)
assert sig == b"0\x06\x02\x01\x01\x02\x01\x01"
- sig2 = dss_sig_value(1037234182290683143945502320610861668562885151617,
- 559776156650501990899426031439030258256861634312)
+ sig2 = der_encode_dsa_signature(
+ 1037234182290683143945502320610861668562885151617,
+ 559776156650501990899426031439030258256861634312
+ )
assert sig2 == (
b'0-\x02\x15\x00\xb5\xaf0xg\xfb\x8bT9\x00\x13\xccg\x02\r\xdf\x1f,\x0b'
b'\x81\x02\x14b\r;"\xabP1D\x0c>5\xea\xb6\xf4\x81)\x8f\x9e\x9f\x08'
)
- sig3 = dss_sig_value(0, 0)
+ sig3 = der_encode_dsa_signature(0, 0)
assert sig3 == b"0\x06\x02\x01\x00\x02\x01\x00"