summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@twistedmatrix.com>2014-01-18 11:21:38 -0500
committerJean-Paul Calderone <exarkun@twistedmatrix.com>2014-01-18 11:21:38 -0500
commitfab157b0b40d1d97b5bee6642f87b852ffe04173 (patch)
tree658e23ce91e2ecf11f55052d36e053be1b0b28fe
parent6922a86ff69b80e406f096716dc0a43413546e50 (diff)
downloadpyopenssl-fab157b0b40d1d97b5bee6642f87b852ffe04173.tar.gz
Use the initialization functions that cryptography 0.1 exposes
-rw-r--r--OpenSSL/SSL.py14
-rw-r--r--OpenSSL/crypto.py5
2 files changed, 5 insertions, 14 deletions
diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py
index 3570ffb..ce2cc29 100644
--- a/OpenSSL/SSL.py
+++ b/OpenSSL/SSL.py
@@ -1420,16 +1420,6 @@ class Connection(object):
ConnectionType = Connection
-# There are no direct unit tests for this initialization. It is tested
-# indirectly since it is necessary for all proper error reporting (via
-# exception_from_error_queue).
-#
-# Thus OpenSSL.test.test_crypto.FunctionTests.test_dump_privatekey_passphrase
-# and some other similar tests may fail without this (though they may not if
-# the Python runtime has already done some initialization of the underlying
-# OpenSSL library (and is linked against the same one that cryptography is
-# using)).
-_lib.ERR_load_SSL_strings()
-
-# This is similar but exercised more by the Context initializer.
+# This is similar to the initialization calls at the end of OpenSSL/crypto.py
+# but is exercised mostly by the Context initializer.
_lib.SSL_library_init()
diff --git a/OpenSSL/crypto.py b/OpenSSL/crypto.py
index 918d33d..d0026bd 100644
--- a/OpenSSL/crypto.py
+++ b/OpenSSL/crypto.py
@@ -2309,5 +2309,6 @@ else:
# using)).
_lib.OpenSSL_add_all_algorithms()
-# This is similar but exercised mainly by exception_from_error_queue.
-_lib.ERR_load_crypto_strings()
+# This is similar but exercised mainly by exception_from_error_queue. It calls
+# both ERR_load_crypto_strings() and ERR_load_SSL_strings().
+_lib.SSL_load_error_strings()