From d259e1d5ae2d71c2c8d8a9ea6317dc1de785dbad Mon Sep 17 00:00:00 2001 From: lovetox Date: Sun, 30 Jan 2022 17:15:40 +0100 Subject: =?UTF-8?q?Don=E2=80=99t=20inherit=20from=20object=20(#1084)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In python3 all classes inherit by default from object --- src/OpenSSL/crypto.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/OpenSSL/crypto.py') 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( -- cgit v1.2.1