diff options
-rw-r--r-- | cryptography/bindings/openssl/api.py | 13 | ||||
-rw-r--r-- | cryptography/bindings/openssl/evp.py | 6 | ||||
-rw-r--r-- | cryptography/bindings/openssl/opensslv.py | 6 |
3 files changed, 9 insertions, 16 deletions
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py index c5da9fb1..bc2b4ae4 100644 --- a/cryptography/bindings/openssl/api.py +++ b/cryptography/bindings/openssl/api.py @@ -44,16 +44,9 @@ class API(object): for name in self._modules: __import__('cryptography.bindings.openssl.' + name) module = sys.modules['cryptography.bindings.openssl.' + name] - self._import_definitions(module, 'includes') - self._import_definitions(module, 'types') - self._import_definitions(module, 'functions') - - def _import_definitions(self, module, name): - """ - Import definitions named definitions from module - """ - container = getattr(self, name) - container.append(getattr(module, name)) + self.includes.append(module.INCLUDES) + self.types.append(module.TYPES) + self.functions.append(module.FUNCTIONS) def _define(self): for typedef in self.types: diff --git a/cryptography/bindings/openssl/evp.py b/cryptography/bindings/openssl/evp.py index 0d969cf8..7795e935 100644 --- a/cryptography/bindings/openssl/evp.py +++ b/cryptography/bindings/openssl/evp.py @@ -11,17 +11,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -includes = """ +INCLUDES = """ #include <openssl/evp.h> """ -types = """ +TYPES = """ typedef struct { ...; } EVP_CIPHER_CTX; typedef ... EVP_CIPHER; typedef ... ENGINE; """ -functions = """ +FUNCTIONS = """ void OpenSSL_add_all_algorithms(); const EVP_CIPHER *EVP_get_cipherbyname(const char *); int EVP_EncryptInit_ex(EVP_CIPHER_CTX *, const EVP_CIPHER *, diff --git a/cryptography/bindings/openssl/opensslv.py b/cryptography/bindings/openssl/opensslv.py index ace7bded..a8f0b9b8 100644 --- a/cryptography/bindings/openssl/opensslv.py +++ b/cryptography/bindings/openssl/opensslv.py @@ -11,13 +11,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -includes = """ +INCLUDES = """ #include <openssl/opensslv.h> """ -types = """ +TYPES = """ static char *const OPENSSL_VERSION_TEXT; """ -functions = "" +FUNCTIONS = "" |