add missing methods to DH interfaces (#3719)
diff --git a/src/cryptography/hazmat/primitives/asymmetric/dh.py b/src/cryptography/hazmat/primitives/asymmetric/dh.py
index d5e8260..fc1317f 100644
--- a/src/cryptography/hazmat/primitives/asymmetric/dh.py
+++ b/src/cryptography/hazmat/primitives/asymmetric/dh.py
@@ -123,6 +123,12 @@
Generates and returns a DHPrivateKey.
"""
+ @abc.abstractmethod
+ def parameter_bytes(self, encoding, format):
+ """
+ Returns the parameters serialized as bytes.
+ """
+
@six.add_metaclass(abc.ABCMeta)
class DHParametersWithSerialization(DHParameters):
@@ -169,6 +175,12 @@
Returns a DHPrivateNumbers.
"""
+ @abc.abstractmethod
+ def private_bytes(self, encoding, format, encryption_algorithm):
+ """
+ Returns the key serialized as bytes.
+ """
+
@six.add_metaclass(abc.ABCMeta)
class DHPublicKey(object):
@@ -192,3 +204,9 @@
"""
Returns a DHPublicNumbers.
"""
+
+ @abc.abstractmethod
+ def public_bytes(self, encoding, format):
+ """
+ Returns the key serialized as bytes.
+ """