Skip to content

Commit

Permalink
Merge pull request #105 from Ivoz/ssl-fix
Browse files Browse the repository at this point in the history
Explicitly add ssl.h as dependency
  • Loading branch information
alex committed Oct 16, 2013
2 parents 1ab3aa4 + 48ac3e6 commit b98118f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cryptography/bindings/openssl/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion cryptography/bindings/openssl/err.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down
26 changes: 26 additions & 0 deletions cryptography/bindings/openssl/ssl.py
Original file line number Diff line number Diff line change
@@ -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 <openssl/ssl.h>
"""

TYPES = """
"""

FUNCTIONS = """
void SSL_load_error_strings();
"""

MACROS = """
"""

0 comments on commit b98118f

Please sign in to comment.