aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.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/utils.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/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)