aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/hazmat/backends/openssl/ec.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-16 13:17:14 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-16 14:34:11 -0600
commit0d6203f25ad15d5e369e23c8a30ba9d2e42eaf1e (patch)
tree74f152da91f230f3b8c006e0ebca3eb5f86cf770 /src/cryptography/hazmat/backends/openssl/ec.py
parent426eee7e732f90f04740e055381f0b37dadc2df1 (diff)
downloadcryptography-0d6203f25ad15d5e369e23c8a30ba9d2e42eaf1e.tar.gz
cryptography-0d6203f25ad15d5e369e23c8a30ba9d2e42eaf1e.tar.bz2
cryptography-0d6203f25ad15d5e369e23c8a30ba9d2e42eaf1e.zip
move asymmetric signature/verification interfaces
Diffstat (limited to 'src/cryptography/hazmat/backends/openssl/ec.py')
-rw-r--r--src/cryptography/hazmat/backends/openssl/ec.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/ec.py b/src/cryptography/hazmat/backends/openssl/ec.py
index d050c6b2..52c93da9 100644
--- a/src/cryptography/hazmat/backends/openssl/ec.py
+++ b/src/cryptography/hazmat/backends/openssl/ec.py
@@ -9,8 +9,10 @@ from cryptography.exceptions import (
InvalidSignature, UnsupportedAlgorithm, _Reasons
)
from cryptography.hazmat.backends.openssl.utils import _truncate_digest
-from cryptography.hazmat.primitives import hashes, interfaces
-from cryptography.hazmat.primitives.asymmetric import ec
+from cryptography.hazmat.primitives import hashes
+from cryptography.hazmat.primitives.asymmetric import (
+ AsymmetricSignatureContext, AsymmetricVerificationContext, ec
+)
def _truncate_digest_for_ecdsa(ec_key_cdata, digest, backend):
@@ -80,7 +82,7 @@ def _sn_to_elliptic_curve(backend, sn):
)
-@utils.register_interface(interfaces.AsymmetricSignatureContext)
+@utils.register_interface(AsymmetricSignatureContext)
class _ECDSASignatureContext(object):
def __init__(self, backend, private_key, algorithm):
self._backend = backend
@@ -114,7 +116,7 @@ class _ECDSASignatureContext(object):
return self._backend._ffi.buffer(sigbuf)[:siglen_ptr[0]]
-@utils.register_interface(interfaces.AsymmetricVerificationContext)
+@utils.register_interface(AsymmetricVerificationContext)
class _ECDSAVerificationContext(object):
def __init__(self, backend, public_key, signature, algorithm):
self._backend = backend