aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-04-20 16:35:29 +0100
committerAlex Stapleton <alexs@prol.etari.at>2014-05-23 21:05:47 +0100
commit69579ffe94195df7d23f5291c631a9f0e3f6a7c2 (patch)
tree04204486d83152194d6964b4bd7158ea601c5907
parenta1853f9bdbabd1f7c48229272915e1fcf4b998e7 (diff)
downloadcryptography-69579ffe94195df7d23f5291c631a9f0e3f6a7c2.tar.gz
cryptography-69579ffe94195df7d23f5291c631a9f0e3f6a7c2.tar.bz2
cryptography-69579ffe94195df7d23f5291c631a9f0e3f6a7c2.zip
Fixup how the digest algorithm is sent
-rw-r--r--cryptography/hazmat/primitives/interfaces.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py
index 5bca9c52..a966d15a 100644
--- a/cryptography/hazmat/primitives/interfaces.py
+++ b/cryptography/hazmat/primitives/interfaces.py
@@ -508,14 +508,20 @@ class EllipticCurve(object):
@six.add_metaclass(abc.ABCMeta)
class EllipticCurveSignatureAlgorithm(object):
+ @abc.abstractproperty
+ def algorithm(self):
+ """
+ The digest algorithm used with this signature.
+ """
+
@abc.abstractmethod
- def signer(self, private_key, algorithm, backend):
+ def signer(self, private_key, backend):
"""
Returns an AsymmetricSignatureContext used for signing data.
"""
@abc.abstractmethod
- def verifier(self, public_key, algorithm, backend):
+ def verifier(self, signature, public_key, backend):
"""
Returns an AsymmetricVerificationContext used for signing data.
"""
@@ -524,7 +530,7 @@ class EllipticCurveSignatureAlgorithm(object):
@six.add_metaclass(abc.ABCMeta)
class EllipticCurvePrivateKey(object):
@abc.abstractmethod
- def signer(self, signature_algorithm, digest_algorithm, backend):
+ def signer(self, signature_algorithm, backend):
"""
Returns an AsymmetricSignatureContext used for signing data.
"""
@@ -569,7 +575,7 @@ class EllipticCurvePrivateKey(object):
@six.add_metaclass(abc.ABCMeta)
class EllipticCurvePublicKey(object):
@abc.abstractmethod
- def verifier(self, signature_algorithm, digest_algorithm, backend):
+ def verifier(self, signature, signature_algorithm, backend):
"""
Returns an AsymmetricVerificationContext used for signing data.
"""