summaryrefslogtreecommitdiff
path: root/src/OpenSSL
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-01-30 17:15:40 +0100
committerGitHub <noreply@github.com>2022-01-30 11:15:40 -0500
commitd259e1d5ae2d71c2c8d8a9ea6317dc1de785dbad (patch)
treea122d16716ccd5259268e268eef0a626128ae54e /src/OpenSSL
parent07f19b6350bfa2c293b11ba781394052ee333a54 (diff)
downloadpyopenssl-d259e1d5ae2d71c2c8d8a9ea6317dc1de785dbad.tar.gz
Don’t inherit from object (#1084)
In python3 all classes inherit by default from object
Diffstat (limited to 'src/OpenSSL')
-rw-r--r--src/OpenSSL/SSL.py8
-rw-r--r--src/OpenSSL/crypto.py32
2 files changed, 20 insertions, 20 deletions
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
index 12374b7..6064233 100644
--- a/src/OpenSSL/SSL.py
+++ b/src/OpenSSL/SSL.py
@@ -293,7 +293,7 @@ class SysCallError(Error):
pass
-class _CallbackExceptionHelper(object):
+class _CallbackExceptionHelper:
"""
A base class for wrapper classes that allow for intelligent exception
handling in OpenSSL callbacks.
@@ -657,7 +657,7 @@ _requires_keylog = _make_requires(
)
-class Session(object):
+class Session:
"""
A class representing an SSL session. A session defines certain connection
parameters which may be re-used to speed up the setup of subsequent
@@ -669,7 +669,7 @@ class Session(object):
pass
-class Context(object):
+class Context:
"""
:class:`OpenSSL.SSL.Context` instances define the parameters for setting
up new SSL connections.
@@ -1588,7 +1588,7 @@ class Context(object):
)
-class Connection(object):
+class Connection:
_reverse_mapping = WeakValueDictionary()
def __init__(self, context, socket=None):
diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py
index ff23062..77b2c6c 100644
--- a/src/OpenSSL/crypto.py
+++ b/src/OpenSSL/crypto.py
@@ -200,7 +200,7 @@ def _get_asn1_time(timestamp):
return string_result
-class _X509NameInvalidator(object):
+class _X509NameInvalidator:
def __init__(self):
self._names = []
@@ -213,7 +213,7 @@ class _X509NameInvalidator(object):
del name._name
-class PKey(object):
+class PKey:
"""
A class representing an DSA or RSA public key or key pair.
"""
@@ -392,7 +392,7 @@ class PKey(object):
return _lib.EVP_PKEY_bits(self._pkey)
-class _EllipticCurve(object):
+class _EllipticCurve:
"""
A representation of a supported elliptic curve.
@@ -528,7 +528,7 @@ def get_elliptic_curve(name):
raise ValueError("unknown curve name", name)
-class X509Name(object):
+class X509Name:
"""
An X.509 Distinguished Name.
@@ -728,7 +728,7 @@ class X509Name(object):
return result
-class X509Extension(object):
+class X509Extension:
"""
An X.509 v3 certificate extension.
"""
@@ -880,7 +880,7 @@ class X509Extension(object):
return _ffi.buffer(char_result, result_length)[:]
-class X509Req(object):
+class X509Req:
"""
An X.509 certificate signing requests.
"""
@@ -1092,7 +1092,7 @@ class X509Req(object):
return result
-class X509(object):
+class X509:
"""
An X.509 certificate.
"""
@@ -1566,7 +1566,7 @@ class X509(object):
return ext
-class X509StoreFlags(object):
+class X509StoreFlags:
"""
Flags for X509 verification, used to change the behavior of
:class:`X509Store`.
@@ -1589,7 +1589,7 @@ class X509StoreFlags(object):
CHECK_SS_SIGNATURE = _lib.X509_V_FLAG_CHECK_SS_SIGNATURE
-class X509Store(object):
+class X509Store:
"""
An X.509 store.
@@ -1755,7 +1755,7 @@ class X509StoreContextError(Exception):
self.certificate = certificate
-class X509StoreContext(object):
+class X509StoreContext:
"""
An X.509 store context.
@@ -2080,7 +2080,7 @@ def dump_privatekey(type, pkey, cipher=None, passphrase=None):
return _bio_to_string(bio)
-class Revoked(object):
+class Revoked:
"""
A certificate revocation.
"""
@@ -2253,7 +2253,7 @@ class Revoked(object):
return _get_asn1_time(dt)
-class CRL(object):
+class CRL:
"""
A certificate revocation list.
"""
@@ -2475,7 +2475,7 @@ class CRL(object):
return dump_crl(type, self)
-class PKCS7(object):
+class PKCS7:
def type_is_signed(self):
"""
Check if this NID_pkcs7_signed object
@@ -2519,7 +2519,7 @@ class PKCS7(object):
return _ffi.string(string_type)
-class PKCS12(object):
+class PKCS12:
"""
A PKCS #12 archive.
"""
@@ -2700,7 +2700,7 @@ class PKCS12(object):
return _bio_to_string(bio)
-class NetscapeSPKI(object):
+class NetscapeSPKI:
"""
A Netscape SPKI object.
"""
@@ -2790,7 +2790,7 @@ class NetscapeSPKI(object):
_openssl_assert(set_result == 1)
-class _PassphraseHelper(object):
+class _PassphraseHelper:
def __init__(self, type, passphrase, more_args=False, truncate=False):
if type != FILETYPE_PEM and passphrase is not None:
raise ValueError(