Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[STANDALONE] OpenSSL has been compiled without RC2 support #107

Open
mwelsch opened this issue Oct 8, 2024 · 1 comment
Open

[STANDALONE] OpenSSL has been compiled without RC2 support #107

mwelsch opened this issue Oct 8, 2024 · 1 comment

Comments

@mwelsch
Copy link

mwelsch commented Oct 8, 2024

Bug description

I want to use the standalone versions, and ran python3 fulfill.py ./mybook.acsm

After installing all the required packages I get this error, related to wbond/oscrypto#60 Any way around this?

Traceback (most recent call last):                        File "/mypath/acsm-calibre-plugin/calibre-plugin/fulfill.py", line 145, in <module>                                                           main()
  File "/mypath/acsm-calibre-plugin/calibre-plugin/fulfill.py", line 132, in main       success, replyData = fulfill(file)                                           ^^^^^^^^^^^^^
  File "/mypath/acsm-calibre-plugin/calibre-plugin/libadobeFulfill.py", line 394, in fulfill                                                    signature = sign_node(fulfill_request_xml)                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            File "/mypath/acsm-calibre-plugin/calibre-plugin/libadobe.py", line 557, in sign_node
    my_priv_key, _, _ = keys.parse_pkcs12(my_pkcs12, base64.b64encode(devkey_bytes))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/oscrypto/_openssl/asymmetric.py", line 800, in parse_pkcs12
    return _parse_pkcs12(data, password, load_private_key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/oscrypto/_asymmetric.py", line 868, in _parse_pkcs12
    decrypted_content = _decrypt_encrypted_data(encryption_algorithm_info, encrypted_content, password)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/oscrypto/_asymmetric.py", line 1038, in _decrypt_encrypted_data
    plaintext = decrypt_func(enc_key, encrypted_content, enc_iv)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/oscrypto/_openssl/symmetric.py", line 358, in rc2_cbc_pkcs5_decrypt
    raise EnvironmentError('OpenSSL has been compiled without RC2 support')
OSError: OpenSSL has been compiled without RC2 support

Running debian trixie/sid and made sure all packages are up to date.

Operating system

Linux

Which version of Calibre are you running?

Which version of the ACSM Input plugin are you running?

Latest github version

Import type

No response

Further information

No response

@Leseratte10
Copy link
Owner

That issue has been fixed in oscrypto's Git repo back in 2022 when that issue was closed.

However, wbond, the developer of oscrypto, hasn't released a new version of oscrypto since then, despite multiple people asking for a new one.

For the standalone scripts you'll probably have to uninstall the oscrypto version from your distribution / from pip, and manually install the latest version from their git repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants