Skip to content

Commit

Permalink
feat: make libcrypto and libssl paths overrideable
Browse files Browse the repository at this point in the history
It is necessary to properly use this plugin on NixOS and also allows
overriding for testing & other purposes.
  • Loading branch information
nydragon authored and Leseratte10 committed Aug 7, 2024
1 parent 27bd953 commit 25a395f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions calibre-plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,20 @@ def initialize(self):

# Okay, now all the modules are available, import the Adobe modules.

# Crucial to import first, as libadobe imports oscrypto as well

libcrypto_path = os.environ["ACSM_LIBCRYPTO"]
libssl_path = os.environ["ACSM_LIBSSL"]

if os.path.exists(libcrypto_path) and os.path.exists(libssl_path):
import oscrypto

oscrypto.use_openssl(
libcrypto_path = libcrypto_path,
libssl_path = libssl_path,
)


from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
from libadobeAccount import createDeviceFile, createUser, signIn, activateDevice
from libadobeFulfill import buildRights, fulfill
Expand Down

0 comments on commit 25a395f

Please sign in to comment.