aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/hazmat/primitives/asymmetric/dsa.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptography/hazmat/primitives/asymmetric/dsa.py')
-rw-r--r--src/cryptography/hazmat/primitives/asymmetric/dsa.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cryptography/hazmat/primitives/asymmetric/dsa.py b/src/cryptography/hazmat/primitives/asymmetric/dsa.py
index 511d3464..03e6a53e 100644
--- a/src/cryptography/hazmat/primitives/asymmetric/dsa.py
+++ b/src/cryptography/hazmat/primitives/asymmetric/dsa.py
@@ -55,6 +55,12 @@ class DSAPrivateKey(object):
Returns an AsymmetricSignatureContext used for signing data.
"""
+ @abc.abstractmethod
+ def sign(self, data, algorithm):
+ """
+ Signs the data
+ """
+
@six.add_metaclass(abc.ABCMeta)
class DSAPrivateKeyWithSerialization(DSAPrivateKey):
@@ -103,6 +109,12 @@ class DSAPublicKey(object):
Returns the key serialized as bytes.
"""
+ @abc.abstractmethod
+ def verify(self, signature, data, algorithm):
+ """
+ Verifies the signature of the data.
+ """
+
DSAPublicKeyWithSerialization = DSAPublicKey