]> xmof Git - DeDRM.git/commit
Fix loading libcrypto on OSX Big Sur
authorDan Norris <protochron@users.noreply.github.com>
Sat, 28 Nov 2020 03:11:44 +0000 (22:11 -0500)
committerDan Norris <protochron@users.noreply.github.com>
Sat, 28 Nov 2020 03:28:34 +0000 (22:28 -0500)
commitcdab22e59cf701adb1267e587a4514f3ee29c400
tree834f82be3af7c849303a0e82299aa83dc3a99273
parent4868a7460e39910ad22d0949d26b3250656dea46
Fix loading libcrypto on OSX Big Sur

It looks like Big Sur removed `libcrypto.dylib` as a file on the
filesystem, so loading it using `ctypes.find_library` fails which breaks
Kindle decryption. Now to load a dylib you need to attempt to load it
directly and the operating system will load the dylib from the OS' cache
or fail.

This fixes the problem by explicitly setting the path to libcrypto to
`/usr/lib/libcrypto.dylib` if `ctypes.find_library` does not find the
file, loading the dylib and raising an exception if it fails at that
point.

See saltstack/salt#5778 for more detailed info.

Closes #1369.
DeDRM_plugin/kindlekey.py