aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils.py
diff options
context:
space:
mode:
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"