Skip to content

Commit 382e5e0

Browse files
authored
remove more global initialization that isn't required on modern openssl (#1108)
1 parent 40e865b commit 382e5e0

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/OpenSSL/crypto.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3239,19 +3239,3 @@ def load_pkcs12(buffer, passphrase=None):
32393239
),
32403240
DeprecationWarning,
32413241
)
3242-
3243-
3244-
# There are no direct unit tests for this initialization. It is tested
3245-
# indirectly since it is necessary for functions like dump_privatekey when
3246-
# using encryption.
3247-
#
3248-
# Thus OpenSSL.test.test_crypto.FunctionTests.test_dump_privatekey_passphrase
3249-
# and some other similar tests may fail without this (though they may not if
3250-
# the Python runtime has already done some initialization of the underlying
3251-
# OpenSSL library (and is linked against the same one that cryptography is
3252-
# using)).
3253-
_lib.OpenSSL_add_all_algorithms()
3254-
3255-
# Set the default string mask to match OpenSSL upstream (since 2005) and
3256-
# RFC5280 recommendations.
3257-
_lib.ASN1_STRING_set_default_mask_asc(b"utf8only")

0 commit comments

Comments
 (0)