aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.rst6
-rw-r--r--docs/hazmat/primitives/asymmetric/dh.rst28
-rw-r--r--src/cryptography/hazmat/primitives/asymmetric/dh.py12
3 files changed, 22 insertions, 24 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 5af45a46..88c945f0 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -29,7 +29,7 @@ Changelog
:func:`~cryptography.hazmat.primitives.serialization.load_pem_parameters`,
:func:`~cryptography.hazmat.primitives.serialization.load_der_parameters`,
and
- :meth:`~cryptography.hazmat.primitives.asymmetric.dh.DHParametersWithSerialization.parameter_bytes`
+ :meth:`~cryptography.hazmat.primitives.asymmetric.dh.DHParameters.parameter_bytes`
.
1.9 - 2017-05-29
@@ -95,9 +95,9 @@ Changelog
to
:class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKeyWithSerialization`.
* Added
- :meth:`~cryptography.hazmat.primitives.asymmetric.dh.DHPublicKeyWithSerialization.public_bytes`
+ :meth:`~cryptography.hazmat.primitives.asymmetric.dh.DHPublicKey.public_bytes`
to
- :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPublicKeyWithSerialization`.
+ :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPublicKey`.
* :func:`~cryptography.hazmat.primitives.serialization.load_pem_private_key`
and
:func:`~cryptography.hazmat.primitives.serialization.load_der_private_key`
diff --git a/docs/hazmat/primitives/asymmetric/dh.rst b/docs/hazmat/primitives/asymmetric/dh.rst
index 2e894dba..f97a328b 100644
--- a/docs/hazmat/primitives/asymmetric/dh.rst
+++ b/docs/hazmat/primitives/asymmetric/dh.rst
@@ -102,13 +102,6 @@ Group parameters
:return: An instance of
:class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey`.
-
-.. class:: DHParametersWithSerialization
-
- .. versionadded:: 0.9
-
- Inherits from :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHParameters`.
-
.. method:: parameter_numbers()
Return the numbers that make up this set of parameters.
@@ -135,6 +128,12 @@ Group parameters
:return bytes: Serialized parameters.
+.. class:: DHParametersWithSerialization
+
+ .. versionadded:: 0.9
+
+ Alias for :class:`DHParameters`.
+
Key interfaces
~~~~~~~~~~~~~~
@@ -163,7 +162,7 @@ Key interfaces
.. versionadded:: 1.7
- :param DHPublicKeyWithSerialization peer_public_key: The public key for
+ :param DHPublicKey peer_public_key: The public key for
the peer.
:return bytes: The agreed key. The bytes are ordered in 'big' endian.
@@ -224,13 +223,6 @@ Key interfaces
:return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHParameters`.
-
-.. class:: DHPublicKeyWithSerialization
-
- .. versionadded:: 0.9
-
- Inherits from :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPublicKey`.
-
.. method:: public_numbers()
Return the numbers that make up this public key.
@@ -256,6 +248,12 @@ Key interfaces
:return bytes: Serialized key.
+.. class:: DHPublicKeyWithSerialization
+
+ .. versionadded:: 0.9
+
+ Alias for :class:`DHPublicKey`.
+
Numbers
~~~~~~~
diff --git a/src/cryptography/hazmat/primitives/asymmetric/dh.py b/src/cryptography/hazmat/primitives/asymmetric/dh.py
index fc1317f0..92a493a0 100644
--- a/src/cryptography/hazmat/primitives/asymmetric/dh.py
+++ b/src/cryptography/hazmat/primitives/asymmetric/dh.py
@@ -129,9 +129,6 @@ class DHParameters(object):
Returns the parameters serialized as bytes.
"""
-
-@six.add_metaclass(abc.ABCMeta)
-class DHParametersWithSerialization(DHParameters):
@abc.abstractmethod
def parameter_numbers(self):
"""
@@ -139,6 +136,9 @@ class DHParametersWithSerialization(DHParameters):
"""
+DHParametersWithSerialization = DHParameters
+
+
@six.add_metaclass(abc.ABCMeta)
class DHPrivateKey(object):
@abc.abstractproperty
@@ -196,9 +196,6 @@ class DHPublicKey(object):
The DHParameters object associated with this public key.
"""
-
-@six.add_metaclass(abc.ABCMeta)
-class DHPublicKeyWithSerialization(DHPublicKey):
@abc.abstractmethod
def public_numbers(self):
"""
@@ -210,3 +207,6 @@ class DHPublicKeyWithSerialization(DHPublicKey):
"""
Returns the key serialized as bytes.
"""
+
+
+DHPublicKeyWithSerialization = DHPublicKey