aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-11-27 10:40:12 -1000
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-11-27 10:43:49 -1000
commitaa7dacaf53e150d9d6e58224c46b88214f2957df (patch)
tree90b716eda89e7f94d65add0bceeb4e38011da3ee /tests/utils.py
parent65d054d1a9b8b122096d7994fc2fe675c06f423f (diff)
downloadcryptography-aa7dacaf53e150d9d6e58224c46b88214f2957df.tar.gz
cryptography-aa7dacaf53e150d9d6e58224c46b88214f2957df.tar.bz2
cryptography-aa7dacaf53e150d9d6e58224c46b88214f2957df.zip
add encode_rfc6979_signature and refactor tests to use it
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 01ab4e6f..37efc580 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -9,9 +9,6 @@ import collections
import re
from contextlib import contextmanager
-from pyasn1.codec.der import encoder
-from pyasn1.type import namedtype, univ
-
import pytest
import six
@@ -73,20 +70,6 @@ def raises_unsupported_algorithm(reason):
assert exc_info.value._reason is reason
-class _DSSSigValue(univ.Sequence):
- componentType = namedtype.NamedTypes(
- namedtype.NamedType('r', univ.Integer()),
- namedtype.NamedType('s', univ.Integer())
- )
-
-
-def der_encode_dsa_signature(r, s):
- sig = _DSSSigValue()
- sig.setComponentByName('r', r)
- sig.setComponentByName('s', s)
- return encoder.encode(sig)
-
-
def load_vectors_from_file(filename, loader, mode="r"):
with cryptography_vectors.open_vector_file(filename, mode) as vector_file:
return loader(vector_file)