Rev943, Less verbose logging by default, Load ZeroBundle SSL lib, Log loaded SSL lib
This commit is contained in:
parent
1d6f56c676
commit
dba42f5f5e
7 changed files with 44 additions and 28 deletions
|
@ -199,12 +199,15 @@ def openLibrary():
|
|||
dll_path = "src/lib/opensslVerify/libeay32.dll"
|
||||
elif sys.platform == "cygwin":
|
||||
dll_path = "/bin/cygcrypto-1.0.0.dll"
|
||||
elif os.path.isfile("../lib/libcrypto.so"): # ZeroBundle
|
||||
dll_path = "../lib/libcrypto.so"
|
||||
else:
|
||||
dll_path = "/usr/local/ssl/lib/libcrypto.so"
|
||||
ssl = _OpenSSL(dll_path)
|
||||
assert ssl
|
||||
except Exception, err:
|
||||
ssl = _OpenSSL(ctypes.util.find_library('ssl') or ctypes.util.find_library('crypto') or ctypes.util.find_library('libcrypto') or 'libeay32')
|
||||
logging.debug("opensslVerify loaded: %s", ssl._lib)
|
||||
|
||||
openLibrary()
|
||||
openssl_version = "%.9X" % ssl._lib.SSLeay()
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
import sys
|
||||
import ctypes
|
||||
import logging
|
||||
import os
|
||||
|
||||
OpenSSL = None
|
||||
|
||||
|
@ -435,6 +437,8 @@ def openLibrary():
|
|||
dll_path = "src/lib/opensslVerify/libeay32.dll"
|
||||
elif sys.platform == "cygwin":
|
||||
dll_path = "/bin/cygcrypto-1.0.0.dll"
|
||||
elif os.path.isfile("../lib/libcrypto.so"): # ZeroBundle
|
||||
dll_path = "../lib/libcrypto.so"
|
||||
else:
|
||||
dll_path = "/usr/local/ssl/lib/libcrypto.so"
|
||||
ssl = _OpenSSL(dll_path)
|
||||
|
@ -442,6 +446,7 @@ def openLibrary():
|
|||
except Exception, err:
|
||||
ssl = _OpenSSL(ctypes.util.find_library('ssl') or ctypes.util.find_library('crypto') or ctypes.util.find_library('libcrypto') or 'libeay32')
|
||||
OpenSSL = ssl
|
||||
logging.debug("pyelliptic loaded: %s", ssl._lib)
|
||||
|
||||
|
||||
def closeLibrary():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue