aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-09-13 19:44:12 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-09-13 19:44:12 -0700
commit6e860dd2c75bfa55775f660ae62a13afcbd84b6f (patch)
tree3e815b26263f55be01be21abbcdd5484b39b5210
parentd97c15803dbfc70532ef9961a019d206623ac1fb (diff)
downloadcryptography-6e860dd2c75bfa55775f660ae62a13afcbd84b6f.tar.gz
cryptography-6e860dd2c75bfa55775f660ae62a13afcbd84b6f.tar.bz2
cryptography-6e860dd2c75bfa55775f660ae62a13afcbd84b6f.zip
Inline this function, it didn't do much
-rw-r--r--cryptography/bindings/openssl/api.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py
index e8730d9a..27afee57 100644
--- a/cryptography/bindings/openssl/api.py
+++ b/cryptography/bindings/openssl/api.py
@@ -31,15 +31,6 @@ class API(object):
def __init__(self):
self._ffi = cffi.FFI()
- self._build_library()
-
- self._lib.OpenSSL_add_all_algorithms()
-
- def _build_library(self):
- """
- Builds the library instance with all of the functions, types, and
- includes from the modules listed in ``_modules``.
- """
includes = []
for name in self._modules:
__import__("cryptography.bindings.openssl." + name)
@@ -47,11 +38,14 @@ class API(object):
self._ffi.cdef(module.TYPES)
self._ffi.cdef(module.FUNCTIONS)
includes.append(module.INCLUDES)
+
self._lib = self._ffi.verify(
source="\n".join(includes),
libraries=["crypto"]
)
+ self._lib.OpenSSL_add_all_algorithms()
+
def openssl_version_text(self):
"""
Friendly string name of linked OpenSSL.