I looked briefly into the issues caused by the dedrm plugin on macOS. As best as I can tell the problem is it tries to load the system libcrypto instead of loading the one bundled with calibre. Apple doesnt allow loading of system libcrypto. Easily verified by doing:
Code:
calibre-debug -c "import ctypes; from ctypes.util import find_library; l = find_library('crypto'); print(l); ctypes.CDLL(l)"
/usr/lib/libcrypto.dylib
WARNING: /Applications/calibre.app/Contents/MacOS/calibre-debug is loading libcrypto in an unsafe way
zsh: abort /Applications/calibre.app/Contents/MacOS/calibre-debug -c
Instead the correct way to load libcrypto on macOS is demonstrated by this snippet:
Code:
calibre-debug -c "import ctypes, sys, glob, os; l = glob.glob(os.path.join(sys.frameworks_dir, 'libcrypto*.dylib'))[0]; ctypes.CDLL(l)"
So the plugin should be changed to do something like this:
Code:
if hasattr(sys, 'frameworks_dir'):
lib = glob.glob(os.path.join(sys.frameworks_dir, 'libcrypto*.dylib'))[0]
else:
lib = find_library('crypto')
Pass this along to the developer of the plugin and hopefully they can release a fix.