aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2017-07-20 13:04:25 +0200
committerAlex Gaynor <alex.gaynor@gmail.com>2017-07-20 07:04:25 -0400
commit0d6aaf49c1890378ce7ecf741a3a40c859d3b9fb (patch)
tree2474a443821ba4b1fb7d9f7018aba278865b7669 /src
parentd3c4ba3a790883be17ca0a4e7ae291d261771700 (diff)
downloadcryptography-0d6aaf49c1890378ce7ecf741a3a40c859d3b9fb.tar.gz
cryptography-0d6aaf49c1890378ce7ecf741a3a40c859d3b9fb.tar.bz2
cryptography-0d6aaf49c1890378ce7ecf741a3a40c859d3b9fb.zip
remove deprecated items (#3794)
* remove deprecated items whirlpool, ripemd160, unsupportedextension, and the old interfaces * flake8 and remove a test generator we no longe use * make it clear we warned you about these things
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/primitives/hashes.py30
-rw-r--r--src/cryptography/hazmat/primitives/interfaces.py17
-rw-r--r--src/cryptography/x509/__init__.py11
-rw-r--r--src/cryptography/x509/extensions.py4
4 files changed, 1 insertions, 61 deletions
diff --git a/src/cryptography/hazmat/primitives/hashes.py b/src/cryptography/hazmat/primitives/hashes.py
index e1172d9d..1764e9ce 100644
--- a/src/cryptography/hazmat/primitives/hashes.py
+++ b/src/cryptography/hazmat/primitives/hashes.py
@@ -143,36 +143,6 @@ class SHA512(object):
@utils.register_interface(HashAlgorithm)
-class RIPEMD160(object):
- name = "ripemd160"
- digest_size = 20
- block_size = 64
-
-
-RIPEMD160 = utils.deprecated(
- RIPEMD160,
- __name__,
- "The RIPEMD160 hash was deprecated in version 1.9.",
- utils.DeprecatedIn19
-)
-
-
-@utils.register_interface(HashAlgorithm)
-class Whirlpool(object):
- name = "whirlpool"
- digest_size = 64
- block_size = 64
-
-
-Whirlpool = utils.deprecated(
- Whirlpool,
- __name__,
- "The Whirlpool hash was deprecated in version 1.9.",
- utils.DeprecatedIn19
-)
-
-
-@utils.register_interface(HashAlgorithm)
class MD5(object):
name = "md5"
digest_size = 16
diff --git a/src/cryptography/hazmat/primitives/interfaces.py b/src/cryptography/hazmat/primitives/interfaces.py
deleted file mode 100644
index c9fdb3bf..00000000
--- a/src/cryptography/hazmat/primitives/interfaces.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# This file is dual licensed under the terms of the Apache License, Version
-# 2.0, and the BSD License. See the LICENSE file in the root of this repository
-# for complete details.
-
-from __future__ import absolute_import, division, print_function
-
-from cryptography import utils
-from cryptography.hazmat.primitives.mac import MACContext as _MACContext
-
-
-MACContext = utils.deprecated(
- _MACContext,
- __name__,
- "MACContext was moved to cryptography.hazmat.primitives.mac.MACContext "
- "in version 1.9.",
- utils.DeprecatedIn19
-)
diff --git a/src/cryptography/x509/__init__.py b/src/cryptography/x509/__init__.py
index b1a32ef6..3b747302 100644
--- a/src/cryptography/x509/__init__.py
+++ b/src/cryptography/x509/__init__.py
@@ -4,7 +4,6 @@
from __future__ import absolute_import, division, print_function
-from cryptography import utils
from cryptography.x509 import certificate_transparency
from cryptography.x509.base import (
Certificate, CertificateBuilder, CertificateRevocationList,
@@ -25,7 +24,7 @@ from cryptography.x509.extensions import (
NameConstraints, NoticeReference, OCSPNoCheck, PolicyConstraints,
PolicyInformation, PrecertificateSignedCertificateTimestamps, ReasonFlags,
SubjectAlternativeName, SubjectKeyIdentifier, UnrecognizedExtension,
- UnsupportedExtension, UserNotice
+ UserNotice
)
from cryptography.x509.general_name import (
DNSName, DirectoryName, GeneralName, IPAddress, OtherName, RFC822Name,
@@ -110,13 +109,6 @@ OID_INVALIDITY_DATE = CRLEntryExtensionOID.INVALIDITY_DATE
OID_CA_ISSUERS = AuthorityInformationAccessOID.CA_ISSUERS
OID_OCSP = AuthorityInformationAccessOID.OCSP
-UnsupportedExtension = utils.deprecated(
- UnsupportedExtension,
- __name__,
- "UnsupportedExtension is no longer necessary, it is never raised",
- utils.DeprecatedIn19
-)
-
__all__ = [
"certificate_transparency",
"load_pem_x509_certificate",
@@ -128,7 +120,6 @@ __all__ = [
"random_serial_number",
"InvalidVersion",
"DuplicateExtension",
- "UnsupportedExtension",
"ExtensionNotFound",
"UnsupportedGeneralNameType",
"NameAttribute",
diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py
index 1b64f4a5..d90465b2 100644
--- a/src/cryptography/x509/extensions.py
+++ b/src/cryptography/x509/extensions.py
@@ -54,10 +54,6 @@ class DuplicateExtension(Exception):
self.oid = oid
-class UnsupportedExtension(Exception):
- pass
-
-
class ExtensionNotFound(Exception):
def __init__(self, msg, oid):
super(ExtensionNotFound, self).__init__(msg)