aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-26 16:40:05 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-27 20:10:30 -0600
commit512ac2280eba827e1b2a377d4c30555c477598c5 (patch)
tree97170eacd26e66e849b4a6657b9ceebe93ef39cb /cryptography
parentecbc00b3d2d3e3daf0d047da4113d7dceb211366 (diff)
downloadcryptography-512ac2280eba827e1b2a377d4c30555c477598c5.tar.gz
cryptography-512ac2280eba827e1b2a377d4c30555c477598c5.tar.bz2
cryptography-512ac2280eba827e1b2a377d4c30555c477598c5.zip
deprecate concrete DSA classes and update DSA docs
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/hazmat/primitives/asymmetric/dsa.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/cryptography/hazmat/primitives/asymmetric/dsa.py b/cryptography/hazmat/primitives/asymmetric/dsa.py
index 7a8a61c1..04b22720 100644
--- a/cryptography/hazmat/primitives/asymmetric/dsa.py
+++ b/cryptography/hazmat/primitives/asymmetric/dsa.py
@@ -13,6 +13,8 @@
from __future__ import absolute_import, division, print_function
+import warnings
+
import six
from cryptography import utils
@@ -56,6 +58,12 @@ def _check_dsa_private_numbers(numbers):
@utils.register_interface(interfaces.DSAParameters)
class DSAParameters(object):
def __init__(self, modulus, subgroup_order, generator):
+ warnings.warn(
+ "The DSAParameters class is deprecated and will be removed in a "
+ "future version.",
+ utils.DeprecatedIn05,
+ stacklevel=2
+ )
_check_dsa_parameters(
DSAParameterNumbers(
p=modulus,
@@ -70,6 +78,11 @@ class DSAParameters(object):
@classmethod
def generate(cls, key_size, backend):
+ warnings.warn(
+ "generate is deprecated and will be removed in a future version.",
+ utils.DeprecatedIn05,
+ stacklevel=2
+ )
if not isinstance(backend, DSABackend):
raise UnsupportedAlgorithm(
"Backend object does not implement DSABackend.",
@@ -112,6 +125,12 @@ class DSAParameters(object):
@utils.register_interface(interfaces.DSAPrivateKey)
class DSAPrivateKey(object):
def __init__(self, modulus, subgroup_order, generator, x, y):
+ warnings.warn(
+ "The DSAPrivateKey class is deprecated and will be removed in a "
+ "future version.",
+ utils.DeprecatedIn05,
+ stacklevel=2
+ )
if (
not isinstance(x, six.integer_types) or
not isinstance(y, six.integer_types)
@@ -140,6 +159,11 @@ class DSAPrivateKey(object):
@classmethod
def generate(cls, parameters, backend):
+ warnings.warn(
+ "generate is deprecated and will be removed in a future version.",
+ utils.DeprecatedIn05,
+ stacklevel=2
+ )
if not isinstance(backend, DSABackend):
raise UnsupportedAlgorithm(
"Backend object does not implement DSABackend.",
@@ -189,6 +213,12 @@ class DSAPrivateKey(object):
@utils.register_interface(interfaces.DSAPublicKey)
class DSAPublicKey(object):
def __init__(self, modulus, subgroup_order, generator, y):
+ warnings.warn(
+ "The DSAPublicKey class is deprecated and will be removed in a "
+ "future version.",
+ utils.DeprecatedIn05,
+ stacklevel=2
+ )
_check_dsa_parameters(
DSAParameterNumbers(
p=modulus,