Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ctypescrypto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from ctypes import CDLL, c_char_p, c_void_p, c_long,c_uint64
from ctypes.util import find_library
import sys
import os
global strings_loaded

def config(filename=None):
Expand All @@ -23,6 +24,12 @@ def config(filename=None):
else:
__libname__ = find_library('crypto')

# Last ditch homebrew openssl
DARWIN_OPENSSL_PATH = '/usr/local/opt/openssl/lib/libcrypto.dylib'
if __libname__ is None and sys.platform == 'darwin' and os.path.isfile(DARWIN_OPENSSL_PATH):
__libname__ = DARWIN_OPENSSL_PATH


if __libname__ is None:
raise OSError("Cannot find OpenSSL crypto library")

Expand Down