diff options
-rw-r--r-- | cryptography/bindings/openssl/api.py | 16 | ||||
-rw-r--r-- | cryptography/bindings/openssl/evp.py | 7 | ||||
-rw-r--r-- | cryptography/bindings/openssl/opensslv.py | 3 |
3 files changed, 13 insertions, 13 deletions
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py index 58885ab7..f9c75e64 100644 --- a/cryptography/bindings/openssl/api.py +++ b/cryptography/bindings/openssl/api.py @@ -32,26 +32,20 @@ class API(object): def __init__(self): self.ffi = cffi.FFI() includes = [] + functions = [] for name in self._modules: __import__("cryptography.bindings.openssl." + name) module = sys.modules["cryptography.bindings.openssl." + name] self.ffi.cdef(module.TYPES) self.ffi.cdef(module.FUNCTIONS) - includes.append(module.INCLUDES) + self.ffi.cdef(module.MACROS) - # Turn any warnings into an error - extra_compile_args = ["-Werror"] - if sys.platform == "darwin": - # All of OpenSSL is deprecated on OS X, so we ignore this. - extra_compile_args.append("-Wno-deprecated") - # Disabled because on stock OS X there is an "-mno-fused-madd" - # which is ignored. - extra_compile_args.append("-Qunused-arguments") + functions.append(module.FUNCTIONS) + includes.append(module.INCLUDES) self.lib = self.ffi.verify( - source="\n".join(includes), + source="\n".join(includes + functions), libraries=["crypto"], - extra_compile_args=extra_compile_args, ) self.lib.OpenSSL_add_all_algorithms() diff --git a/cryptography/bindings/openssl/evp.py b/cryptography/bindings/openssl/evp.py index 8d2230fd..740f125e 100644 --- a/cryptography/bindings/openssl/evp.py +++ b/cryptography/bindings/openssl/evp.py @@ -27,12 +27,15 @@ FUNCTIONS = """ void OpenSSL_add_all_algorithms(); const EVP_CIPHER *EVP_get_cipherbyname(const char *); int EVP_EncryptInit_ex(EVP_CIPHER_CTX *, const EVP_CIPHER *, ENGINE *, - unsigned char *, unsigned char *); + const unsigned char *, const unsigned char *); int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *, int); int EVP_EncryptUpdate(EVP_CIPHER_CTX *, unsigned char *, int *, - unsigned char *, int); + const unsigned char *, int); int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *, unsigned char *, int *); int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *); const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *); int EVP_CIPHER_block_size(const EVP_CIPHER *); """ + +MACROS = """ +""" diff --git a/cryptography/bindings/openssl/opensslv.py b/cryptography/bindings/openssl/opensslv.py index 9b2db270..d1a1b3e6 100644 --- a/cryptography/bindings/openssl/opensslv.py +++ b/cryptography/bindings/openssl/opensslv.py @@ -21,3 +21,6 @@ static char *const OPENSSL_VERSION_TEXT; FUNCTIONS = """ """ + +MACROS = """ +""" |