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.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/cryptography/hazmat/primitives/asymmetric/dsa.py b/src/cryptography/hazmat/primitives/asymmetric/dsa.py
index 084686e4..4d332f2a 100644
--- a/src/cryptography/hazmat/primitives/asymmetric/dsa.py
+++ b/src/cryptography/hazmat/primitives/asymmetric/dsa.py
@@ -104,13 +104,30 @@ class DSAPublicKey(object):
@six.add_metaclass(abc.ABCMeta)
-class DSAPublicKeyWithNumbers(DSAPublicKey):
+class DSAPublicKeyWithSerialization(DSAPublicKey):
@abc.abstractmethod
def public_numbers(self):
"""
Returns a DSAPublicNumbers.
"""
+ @abc.abstractmethod
+ def public_bytes(self, encoding, format):
+ """
+ Returns the key serialized as bytes.
+ """
+
+
+DSAPublicKeyWithNumbers = utils.deprecated(
+ DSAPublicKeyWithSerialization,
+ __name__,
+ (
+ "The DSAPublicKeyWithNumbers interface has been renamed to "
+ "DSAPublicKeyWithSerialization"
+ ),
+ utils.DeprecatedIn08
+)
+
def generate_parameters(key_size, backend):
return backend.generate_dsa_parameters(key_size)