From 48ac3e60e27ddb41937872f151d340388d5ba803 Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Thu, 17 Oct 2013 06:23:30 +1100 Subject: [PATCH] Explicitly add ssl.h as dependency Add ssl as a linked library, this is at least necessary on ArchLinux --- cryptography/bindings/openssl/api.py | 7 ++++--- cryptography/bindings/openssl/err.py | 1 - cryptography/bindings/openssl/ssl.py | 26 ++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 cryptography/bindings/openssl/ssl.py diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py index 02ba8fd47592..f1a2c087a753 100644 --- a/cryptography/bindings/openssl/api.py +++ b/cryptography/bindings/openssl/api.py @@ -26,17 +26,18 @@ class API(object): """ _modules = [ "bignum", - "conf", "bio", + "conf", "crypto", "dh", "dsa", "engine", "err", "evp", + "opensslv", "rand", "rsa", - "opensslv", + "ssl", ] def __init__(self): @@ -71,7 +72,7 @@ def __init__(self): # int foo(short); self.lib = self.ffi.verify( source="\n".join(includes + functions), - libraries=["crypto"], + libraries=["crypto", "ssl"], ) self.lib.OpenSSL_add_all_algorithms() diff --git a/cryptography/bindings/openssl/err.py b/cryptography/bindings/openssl/err.py index ffb6096a4702..76c34a03bd37 100644 --- a/cryptography/bindings/openssl/err.py +++ b/cryptography/bindings/openssl/err.py @@ -24,7 +24,6 @@ """ FUNCTIONS = """ -void SSL_load_error_strings(); void ERR_load_crypto_strings(); void ERR_free_strings(); char* ERR_error_string(unsigned long, char *); diff --git a/cryptography/bindings/openssl/ssl.py b/cryptography/bindings/openssl/ssl.py new file mode 100644 index 000000000000..8aca86e48d5f --- /dev/null +++ b/cryptography/bindings/openssl/ssl.py @@ -0,0 +1,26 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +INCLUDES = """ +#include +""" + +TYPES = """ +""" + +FUNCTIONS = """ +void SSL_load_error_strings(); +""" + +MACROS = """ +"""