mirror of
https://github.com/Leseratte10/acsm-calibre-plugin.git
synced 2024-12-22 17:29:56 +06:00
feat: make libcrypto and libssl paths overrideable
It is necessary to properly use this plugin on NixOS and also allows overriding for testing & other purposes.
This commit is contained in:
parent
27bd9531c4
commit
25a395f128
@ -285,6 +285,20 @@ class ACSMInput(FileTypePlugin):
|
|||||||
|
|
||||||
# Okay, now all the modules are available, import the Adobe modules.
|
# 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 libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
|
||||||
from libadobeAccount import createDeviceFile, createUser, signIn, activateDevice
|
from libadobeAccount import createDeviceFile, createUser, signIn, activateDevice
|
||||||
from libadobeFulfill import buildRights, fulfill
|
from libadobeFulfill import buildRights, fulfill
|
||||||
|
Loading…
Reference in New Issue
Block a user