flake8 a bunch of stuff
diff --git a/OpenSSL/crypto.py b/OpenSSL/crypto.py
index b255ed6..845c0c1 100644
--- a/OpenSSL/crypto.py
+++ b/OpenSSL/crypto.py
@@ -29,7 +29,6 @@
TYPE_DSA = _lib.EVP_PKEY_DSA
-
class Error(Exception):
"""
An error occurred in an `OpenSSL.crypto` API.
@@ -39,7 +38,6 @@
_raise_current_error = partial(_exception_from_error_queue, Error)
-
def _untested_error(where):
"""
An OpenSSL API failed somehow. Additionally, the failure which was
@@ -49,7 +47,6 @@
raise RuntimeError("Unknown %s failure" % (where,))
-
def _new_mem_buf(buffer=None):
"""
Allocate a new OpenSSL memory BIO.
@@ -77,7 +74,6 @@
return bio
-
def _bio_to_string(bio):
"""
Copy the contents of an OpenSSL BIO object into a Python byte string.
@@ -87,7 +83,6 @@
return _ffi.buffer(result_buffer[0], buffer_length)[:]
-
def _set_asn1_time(boundary, when):
"""
The the time value of an ASN1 time object.
@@ -118,7 +113,6 @@
_untested_error()
-
def _get_asn1_time(timestamp):
"""
Retrieve the time value of an ASN1 time object.
@@ -157,7 +151,6 @@
return string_result
-
class PKey(object):
"""
A class representing an DSA or RSA public key or key pair.
@@ -170,7 +163,6 @@
self._pkey = _ffi.gc(pkey, _lib.EVP_PKEY_free)
self._initialized = False
-
def generate_key(self, type, bits):
"""
Generate a key pair of the given type, with the given number of bits.
@@ -237,7 +229,6 @@
self._initialized = True
-
def check(self):
"""
Check the consistency of an RSA private key.
@@ -262,7 +253,6 @@
return True
_raise_current_error()
-
def type(self):
"""
Returns the type of the key
@@ -271,7 +261,6 @@
"""
return self._pkey.type
-
def bits(self):
"""
Returns the number of bits of the key
@@ -282,7 +271,6 @@
PKeyType = PKey
-
class _EllipticCurve(object):
"""
A representation of a supported elliptic curve.
@@ -307,7 +295,6 @@
return super(_EllipticCurve, self).__ne__(other)
return NotImplemented
-
@classmethod
def _load_elliptic_curves(cls, lib):
"""
@@ -330,7 +317,6 @@
for c in builtin_curves)
return set()
-
@classmethod
def _get_elliptic_curves(cls, lib):
"""
@@ -345,7 +331,6 @@
cls._curves = cls._load_elliptic_curves(lib)
return cls._curves
-
@classmethod
def from_nid(cls, lib, nid):
"""
@@ -363,7 +348,6 @@
"""
return cls(lib, nid, _ffi.string(lib.OBJ_nid2sn(nid)).decode("ascii"))
-
def __init__(self, lib, nid, name):
"""
:param _lib: The :py:mod:`cryptography` binding instance used to
@@ -381,11 +365,9 @@
self._nid = nid
self.name = name
-
def __repr__(self):
return "<Curve %r>" % (self.name,)
-
def _to_EC_KEY(self):
"""
Create a new OpenSSL EC_KEY structure initialized to use this curve.
@@ -397,7 +379,6 @@
return _ffi.gc(key, _lib.EC_KEY_free)
-
def get_elliptic_curves():
"""
Return a set of objects representing the elliptic curves supported in the
@@ -413,7 +394,6 @@
return _EllipticCurve._get_elliptic_curves(_lib)
-
def get_elliptic_curve(name):
"""
Return a single curve object selected by name.
@@ -432,7 +412,6 @@
raise ValueError("unknown curve name", name)
-
class X509Name(object):
"""
An X.509 Distinguished Name.
@@ -467,7 +446,6 @@
name = _lib.X509_NAME_dup(name._name)
self._name = _ffi.gc(name, _lib.X509_NAME_free)
-
def __setattr__(self, name, value):
if name.startswith('_'):
return super(X509Name, self).__setattr__(name, value)
@@ -476,7 +454,7 @@
# isinstance.
if type(name) is not str:
raise TypeError("attribute name must be string, not '%.200s'" % (
- type(value).__name__,))
+ type(value).__name__,))
nid = _lib.OBJ_txt2nid(_byte_string(name))
if nid == _lib.NID_undef:
@@ -504,7 +482,6 @@
if not add_result:
_raise_current_error()
-
def __getattr__(self, name):
"""
Find attribute. An X509Name object has the following attributes:
@@ -545,7 +522,6 @@
_lib.OPENSSL_free(result_buffer[0])
return result
-
def _cmp(op):
def f(self, other):
if not isinstance(other, X509Name):
@@ -578,7 +554,6 @@
return "<X509Name object '%s'>" % (
_native(_ffi.string(result_buffer)),)
-
def hash(self):
"""
Return an integer representation of the first four bytes of the
@@ -591,7 +566,6 @@
"""
return _lib.X509_NAME_hash(self._name)
-
def der(self):
"""
Return the DER encoding of this name.
@@ -609,7 +583,6 @@
_lib.OPENSSL_free(result_buffer[0])
return string_result
-
def get_components(self):
"""
Returns the components of this name, as a sequence of 2-tuples.
@@ -628,19 +601,17 @@
name = _lib.OBJ_nid2sn(nid)
result.append((
- _ffi.string(name),
- _ffi.string(
- _lib.ASN1_STRING_data(fval),
- _lib.ASN1_STRING_length(fval))))
+ _ffi.string(name),
+ _ffi.string(
+ _lib.ASN1_STRING_data(fval),
+ _lib.ASN1_STRING_length(fval))))
return result
-
X509NameType = X509Name
-
class X509Extension(object):
"""
An X.509 v3 certificate extension.
@@ -677,7 +648,8 @@
# Initialize the subject and issuer, if appropriate. ctx is a local,
# and as far as I can tell none of the X509V3_* APIs invoked here steal
- # any references, so no need to mess with reference counts or duplicates.
+ # any references, so no need to mess with reference counts or
+ # duplicates.
if issuer is not None:
if not isinstance(issuer, X509):
raise TypeError("issuer must be an X509 instance")
@@ -702,7 +674,6 @@
_raise_current_error()
self._extension = _ffi.gc(extension, _lib.X509_EXTENSION_free)
-
@property
def _nid(self):
return _lib.OBJ_obj2nid(self._extension.object)
@@ -711,7 +682,7 @@
_lib.GEN_EMAIL: "email",
_lib.GEN_DNS: "DNS",
_lib.GEN_URI: "URI",
- }
+ }
def _subjectAltNameString(self):
method = _lib.X509V3_EXT_get(self._extension)
@@ -749,7 +720,6 @@
parts.append(label + ":" + value)
return ", ".join(parts)
-
def __str__(self):
"""
:return: a nice text representation of the extension
@@ -765,7 +735,6 @@
return _native(_bio_to_string(bio))
-
def get_critical(self):
"""
Returns the critical field of this X.509 extension.
@@ -774,7 +743,6 @@
"""
return _lib.X509_EXTENSION_get_critical(self._extension)
-
def get_short_name(self):
"""
Returns the short type name of this X.509 extension.
@@ -790,7 +758,6 @@
nid = _lib.OBJ_obj2nid(obj)
return _ffi.string(_lib.OBJ_nid2sn(nid))
-
def get_data(self):
"""
Returns the data of the X509 extension, encoded as ASN.1.
@@ -807,20 +774,18 @@
return _ffi.buffer(char_result, result_length)[:]
-
X509ExtensionType = X509Extension
-
class X509Req(object):
"""
An X.509 certificate signing requests.
"""
+
def __init__(self):
req = _lib.X509_REQ_new()
self._req = _ffi.gc(req, _lib.X509_REQ_free)
-
def set_pubkey(self, pkey):
"""
Set the public key of the certificate signing request.
@@ -835,7 +800,6 @@
# TODO: This is untested.
_raise_current_error()
-
def get_pubkey(self):
"""
Get the public key of the certificate signing request.
@@ -852,7 +816,6 @@
pkey._only_public = True
return pkey
-
def set_version(self, version):
"""
Set the version subfield (RFC 2459, section 4.1.2.1) of the certificate
@@ -865,7 +828,6 @@
if not set_result:
_raise_current_error()
-
def get_version(self):
"""
Get the version subfield (RFC 2459, section 4.1.2.1) of the certificate
@@ -876,7 +838,6 @@
"""
return _lib.X509_REQ_get_version(self._req)
-
def get_subject(self):
"""
Return the subject of this certificate signing request.
@@ -899,7 +860,6 @@
return name
-
def add_extensions(self, extensions):
"""
Add extensions to the certificate signing request.
@@ -927,7 +887,6 @@
# TODO: This is untested.
_raise_current_error()
-
def get_extensions(self):
"""
Get X.509 extensions in the certificate signing request.
@@ -945,7 +904,6 @@
exts.append(ext)
return exts
-
def sign(self, pkey, digest):
"""
Sign the certificate signing request with this key and digest type.
@@ -972,7 +930,6 @@
# TODO: This is untested.
_raise_current_error()
-
def verify(self, pkey):
"""
Verifies the signature on this certificate signing request.
@@ -994,21 +951,19 @@
return result
-
X509ReqType = X509Req
-
class X509(object):
"""
An X.509 certificate.
"""
+
def __init__(self):
# TODO Allocation failure? And why not __new__ instead of __init__?
x509 = _lib.X509_new()
self._x509 = _ffi.gc(x509, _lib.X509_free)
-
def set_version(self, version):
"""
Set the version number of the certificate.
@@ -1023,7 +978,6 @@
_lib.X509_set_version(self._x509, version)
-
def get_version(self):
"""
Return the version number of the certificate.
@@ -1033,7 +987,6 @@
"""
return _lib.X509_get_version(self._x509)
-
def get_pubkey(self):
"""
Get the public key of the certificate.
@@ -1049,7 +1002,6 @@
pkey._only_public = True
return pkey
-
def set_pubkey(self, pkey):
"""
Set the public key of the certificate.
@@ -1066,7 +1018,6 @@
if not set_result:
_raise_current_error()
-
def sign(self, pkey, digest):
"""
Sign the certificate with this key and digest type.
@@ -1096,7 +1047,6 @@
if not sign_result:
_raise_current_error()
-
def get_signature_algorithm(self):
"""
Return the signature algorithm used in the certificate.
@@ -1114,7 +1064,6 @@
raise ValueError("Undefined signature algorithm")
return _ffi.string(_lib.OBJ_nid2ln(nid))
-
def digest(self, digest_name):
"""
Return the digest of the X509 object.
@@ -1142,9 +1091,8 @@
_raise_current_error()
return b":".join([
- b16encode(ch).upper() for ch
- in _ffi.buffer(result_buffer, result_length[0])])
-
+ b16encode(ch).upper() for ch
+ in _ffi.buffer(result_buffer, result_length[0])])
def subject_name_hash(self):
"""
@@ -1155,7 +1103,6 @@
"""
return _lib.X509_subject_name_hash(self._x509)
-
def set_serial_number(self, serial):
"""
Set the serial number of the certificate.
@@ -1197,7 +1144,6 @@
# TODO Not tested
_raise_current_error()
-
def get_serial_number(self):
"""
Return the serial number of this certificate.
@@ -1218,7 +1164,6 @@
finally:
_lib.BN_free(bignum_serial)
-
def gmtime_adj_notAfter(self, amount):
"""
Adjust the time stamp on which the certificate stops being valid.
@@ -1234,7 +1179,6 @@
notAfter = _lib.X509_get_notAfter(self._x509)
_lib.X509_gmtime_adj(notAfter, amount)
-
def gmtime_adj_notBefore(self, amount):
"""
Adjust the timestamp on which the certificate starts being valid.
@@ -1248,7 +1192,6 @@
notBefore = _lib.X509_get_notBefore(self._x509)
_lib.X509_gmtime_adj(notBefore, amount)
-
def has_expired(self):
"""
Check whether the certificate has expired.
@@ -1262,11 +1205,9 @@
return _lib.ASN1_UTCTIME_cmp_time_t(
_ffi.cast('ASN1_UTCTIME*', notAfter), now) < 0
-
def _get_boundary_time(self, which):
return _get_asn1_time(which(self._x509))
-
def get_notBefore(self):
"""
Get the timestamp at which the certificate starts being valid.
@@ -1282,11 +1223,9 @@
"""
return self._get_boundary_time(_lib.X509_get_notBefore)
-
def _set_boundary_time(self, which, when):
return _set_asn1_time(which(self._x509), when)
-
def set_notBefore(self, when):
"""
Set the timestamp at which the certificate starts being valid.
@@ -1304,7 +1243,6 @@
"""
return self._set_boundary_time(_lib.X509_get_notBefore, when)
-
def get_notAfter(self):
"""
Get the timestamp at which the certificate stops being valid.
@@ -1320,7 +1258,6 @@
"""
return self._get_boundary_time(_lib.X509_get_notAfter)
-
def set_notAfter(self, when):
"""
Set the timestamp at which the certificate stops being valid.
@@ -1338,7 +1275,6 @@
"""
return self._set_boundary_time(_lib.X509_get_notAfter, when)
-
def _get_name(self, which):
name = X509Name.__new__(X509Name)
name._name = which(self._x509)
@@ -1352,7 +1288,6 @@
return name
-
def _set_name(self, which, name):
if not isinstance(name, X509Name):
raise TypeError("name must be an X509Name")
@@ -1361,7 +1296,6 @@
# TODO: This is untested.
_raise_current_error()
-
def get_issuer(self):
"""
Return the issuer of this certificate.
@@ -1374,7 +1308,6 @@
"""
return self._get_name(_lib.X509_get_issuer_name)
-
def set_issuer(self, issuer):
"""
Set the issuer of this certificate.
@@ -1386,7 +1319,6 @@
"""
return self._set_name(_lib.X509_set_issuer_name, issuer)
-
def get_subject(self):
"""
Return the subject of this certificate.
@@ -1399,7 +1331,6 @@
"""
return self._get_name(_lib.X509_get_subject_name)
-
def set_subject(self, subject):
"""
Set the subject of this certificate.
@@ -1411,7 +1342,6 @@
"""
return self._set_name(_lib.X509_set_subject_name, subject)
-
def get_extension_count(self):
"""
Get the number of extensions on this certificate.
@@ -1423,7 +1353,6 @@
"""
return _lib.X509_get_ext_count(self._x509)
-
def add_extensions(self, extensions):
"""
Add extensions to the certificate.
@@ -1440,7 +1369,6 @@
if not add_result:
_raise_current_error()
-
def get_extension(self, index):
"""
Get a specific extension of the certificate by index.
@@ -1465,20 +1393,18 @@
return ext
-
X509Type = X509
-
class X509Store(object):
"""
An X509 certificate store.
"""
+
def __init__(self):
store = _lib.X509_STORE_new()
self._store = _ffi.gc(store, _lib.X509_STORE_free)
-
def add_cert(self, cert):
"""
Adds the certificate :py:data:`cert` to this store.
@@ -1509,6 +1435,7 @@
:ivar certificate: The certificate which caused verificate failure.
:type certificate: :class:`X509`
"""
+
def __init__(self, message, certificate):
super(X509StoreContextError, self).__init__(message)
self.certificate = certificate
@@ -1553,7 +1480,6 @@
# :py:meth:`_init` have no adverse affect.
self._init()
-
def _init(self):
"""
Set up the store context for a subsequent verification operation.
@@ -1562,7 +1488,6 @@
if ret <= 0:
_raise_current_error()
-
def _cleanup(self):
"""
Internally cleans up the store context.
@@ -1572,7 +1497,6 @@
"""
_lib.X509_STORE_CTX_cleanup(self._store_ctx)
-
def _exception_from_context(self):
"""
Convert an OpenSSL native context error failure into a Python
@@ -1595,7 +1519,6 @@
pycert._x509 = _ffi.gc(_cert, _lib.X509_free)
return X509StoreContextError(errors, pycert)
-
def set_store(self, store):
"""
Set the context's trust store.
@@ -1607,7 +1530,6 @@
"""
self._store = store
-
def verify_certificate(self):
"""
Verify a certificate in a context.
@@ -1629,7 +1551,6 @@
raise self._exception_from_context()
-
def load_certificate(type, buffer):
"""
Load a certificate from a buffer
@@ -1739,7 +1660,6 @@
return _bio_to_string(bio)
-
def _X509_REVOKED_dup(original):
copy = _lib.X509_REVOKED_new()
if copy == _ffi.NULL:
@@ -1766,7 +1686,6 @@
return copy
-
class Revoked(object):
"""
A certificate revocation.
@@ -1790,7 +1709,6 @@
revoked = _lib.X509_REVOKED_new()
self._revoked = _ffi.gc(revoked, _lib.X509_REVOKED_free)
-
def set_serial(self, hex_str):
"""
Set the serial number.
@@ -1815,7 +1733,6 @@
_lib.ASN1_INTEGER_free)
_lib.X509_REVOKED_set_serialNumber(self._revoked, asn1_serial)
-
def get_serial(self):
"""
Get the serial number.
@@ -1835,7 +1752,6 @@
return _bio_to_string(bio)
-
def _delete_reason(self):
stack = self._revoked.extensions
for i in range(_lib.sk_X509_EXTENSION_num(stack)):
@@ -1845,7 +1761,6 @@
_lib.sk_X509_EXTENSION_delete(stack, i)
break
-
def set_reason(self, reason):
"""
Set the reason of this revocation.
@@ -1889,7 +1804,6 @@
# TODO: This is untested.
_raise_current_error()
-
def get_reason(self):
"""
Set the reason of this revocation.
@@ -1917,7 +1831,6 @@
return _bio_to_string(bio)
-
def all_reasons(self):
"""
Return a list of all the supported reason strings.
@@ -1930,7 +1843,6 @@
"""
return self._crl_reasons[:]
-
def set_rev_date(self, when):
"""
Set the revocation timestamp.
@@ -1941,7 +1853,6 @@
"""
return _set_asn1_time(self._revoked.revocationDate, when)
-
def get_rev_date(self):
"""
Get the revocation timestamp.
@@ -1952,11 +1863,11 @@
return _get_asn1_time(self._revoked.revocationDate)
-
class CRL(object):
"""
A certificate revocation list.
"""
+
def __init__(self):
"""
Create a new empty certificate revocation list.
@@ -1964,7 +1875,6 @@
crl = _lib.X509_CRL_new()
self._crl = _ffi.gc(crl, _lib.X509_CRL_free)
-
def get_revoked(self):
"""
Return the revocations in this certificate revocation list.
@@ -1986,7 +1896,6 @@
if results:
return tuple(results)
-
def add_revoked(self, revoked):
"""
Add a revoked (by value not reference) to the CRL structure
@@ -2010,7 +1919,6 @@
# TODO: This is untested.
_raise_current_error()
-
def export(self, cert, key, type=FILETYPE_PEM, days=100,
digest=_UNSPECIFIED):
"""
@@ -2057,7 +1965,8 @@
# TODO: This is untested.
_raise_current_error()
- # A scratch time object to give different values to different CRL fields
+ # A scratch time object to give different values to different CRL
+ # fields
sometime = _lib.ASN1_TIME_new()
if sometime == _ffi.NULL:
# TODO: This is untested.
@@ -2093,7 +2002,6 @@
CRLType = CRL
-
class PKCS7(object):
def type_is_signed(self):
"""
@@ -2105,7 +2013,6 @@
return True
return False
-
def type_is_enveloped(self):
"""
Check if this NID_pkcs7_enveloped object
@@ -2116,7 +2023,6 @@
return True
return False
-
def type_is_signedAndEnveloped(self):
"""
Check if this NID_pkcs7_signedAndEnveloped object
@@ -2127,7 +2033,6 @@
return True
return False
-
def type_is_data(self):
"""
Check if this NID_pkcs7_data object
@@ -2138,7 +2043,6 @@
return True
return False
-
def get_type_name(self):
"""
Returns the type name of the PKCS7 structure
@@ -2152,18 +2056,17 @@
PKCS7Type = PKCS7
-
class PKCS12(object):
"""
A PKCS #12 archive.
"""
+
def __init__(self):
self._pkey = None
self._cert = None
self._cacerts = None
self._friendlyname = None
-
def get_certificate(self):
"""
Get the certificate in the PKCS #12 structure.
@@ -2173,7 +2076,6 @@
"""
return self._cert
-
def set_certificate(self, cert):
"""
Set the certificate in the PKCS #12 structure.
@@ -2187,7 +2089,6 @@
raise TypeError("cert must be an X509 instance")
self._cert = cert
-
def get_privatekey(self):
"""
Get the private key in the PKCS #12 structure.
@@ -2197,7 +2098,6 @@
"""
return self._pkey
-
def set_privatekey(self, pkey):
"""
Set the certificate portion of the PKCS #12 structure.
@@ -2211,7 +2111,6 @@
raise TypeError("pkey must be a PKey instance")
self._pkey = pkey
-
def get_ca_certificates(self):
"""
Get the CA certificates in the PKCS #12 structure.
@@ -2223,7 +2122,6 @@
if self._cacerts is not None:
return tuple(self._cacerts)
-
def set_ca_certificates(self, cacerts):
"""
Replace or set the CA certificates within the PKCS12 object.
@@ -2243,7 +2141,6 @@
raise TypeError("iterable must only contain X509 instances")
self._cacerts = cacerts
-
def set_friendlyname(self, name):
"""
Set the friendly name in the PKCS #12 structure.
@@ -2259,7 +2156,6 @@
raise TypeError("name must be a byte string or None (not %r)" % (name,))
self._friendlyname = name
-
def get_friendlyname(self):
"""
Get the friendly name in the PKCS# 12 structure.
@@ -2269,7 +2165,6 @@
"""
return self._friendlyname
-
def export(self, passphrase=None, iter=2048, maciter=1):
"""
Dump a PKCS12 object as a string.
@@ -2331,20 +2226,18 @@
return _bio_to_string(bio)
-
PKCS12Type = PKCS12
-
class NetscapeSPKI(object):
"""
A Netscape SPKI object.
"""
+
def __init__(self):
spki = _lib.NETSCAPE_SPKI_new()
self._spki = _ffi.gc(spki, _lib.NETSCAPE_SPKI_free)
-
def sign(self, pkey, digest):
"""
Sign the certificate request with this key and digest type.
@@ -2372,7 +2265,6 @@
# TODO: This is untested.
_raise_current_error()
-
def verify(self, key):
"""
Verifies a signature on a certificate request.
@@ -2391,7 +2283,6 @@
_raise_current_error()
return True
-
def b64_encode(self):
"""
Generate a base64 encoded representation of this SPKI object.
@@ -2404,7 +2295,6 @@
_lib.CRYPTO_free(encoded)
return result
-
def get_pubkey(self):
"""
Get the public key of this certificate.
@@ -2421,7 +2311,6 @@
pkey._only_public = True
return pkey
-
def set_pubkey(self, pkey):
"""
Set the public key of the certificate
@@ -2435,11 +2324,9 @@
_raise_current_error()
-
NetscapeSPKIType = NetscapeSPKI
-
class _PassphraseHelper(object):
def __init__(self, type, passphrase, more_args=False, truncate=False):
if type != FILETYPE_PEM and passphrase is not None:
@@ -2449,7 +2336,6 @@
self._truncate = truncate
self._problems = []
-
@property
def callback(self):
if self._passphrase is None:
@@ -2461,7 +2347,6 @@
else:
raise TypeError("Last argument must be string or callable")
-
@property
def callback_args(self):
if self._passphrase is None:
@@ -2473,7 +2358,6 @@
else:
raise TypeError("Last argument must be string or callable")
-
def raise_if_problem(self, exceptionType=Error):
try:
_exception_from_error_queue(exceptionType)
@@ -2483,7 +2367,6 @@
raise self._problems[0]
return from_queue
-
def _read_passphrase(self, buf, size, rwflag, userdata):
try:
if self._more_args:
@@ -2505,7 +2388,6 @@
return 0
-
def load_privatekey(type, buffer, passphrase=None):
"""
Load a private key from a buffer
@@ -2541,7 +2423,6 @@
return pkey
-
def dump_certificate_request(type, req):
"""
Dump a certificate request to a buffer
@@ -2568,7 +2449,6 @@
return _bio_to_string(bio)
-
def load_certificate_request(type, buffer):
"""
Load a certificate request from a buffer
@@ -2598,7 +2478,6 @@
return x509req
-
def sign(pkey, data, digest):
"""
Sign data with a digest
@@ -2633,7 +2512,6 @@
return _ffi.buffer(signature_buffer, signature_length[0])[:]
-
def verify(cert, signature, data, digest):
"""
Verify a signature.
@@ -2696,7 +2574,6 @@
return result
-
def load_pkcs7_data(type, buffer):
"""
Load pkcs7 data from a buffer
@@ -2727,7 +2604,6 @@
return pypkcs7
-
def load_pkcs12(buffer, passphrase=None):
"""
Load a PKCS12 object from a buffer
@@ -2824,7 +2700,6 @@
_lib.SSL_load_error_strings()
-
# Set the default string mask to match OpenSSL upstream (since 2005) and
# RFC5280 recommendations.
_lib.ASN1_STRING_set_default_mask_asc(b'utf8only')