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

LibraryNotFoundError('Error detecting the version of libcrypto') on 0.5.7 #37

Open
MaxRozendaal opened this issue Oct 8, 2023 · 2 comments

Comments

@MaxRozendaal
Copy link

I installed version 0.5.7 with pipx:

pipx install git+https://github.com/skelsec/msldap.git

When running msldap the following error is thrown:

Traceback (most recent call last):
  File "/home/kali/tools/msldap/msldap/bin/msldap", line 5, in <module>
    from msldap.examples.msldapclient import main
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/msldap/examples/msldapclient.py", line 16, in <module>
    from asyauth.common.credentials import UniCredential
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/asyauth/common/credentials/__init__.py", line 315, in <module>
    from asyauth.common.credentials.kerberos import KerberosCredential
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/asyauth/common/credentials/kerberos.py", line 7, in <module>
    from minikerberos.common.creds import KerberosCredential as KCRED
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/minikerberos/common/creds.py", line 22, in <module>
    from oscrypto.asymmetric import rsa_pkcs1v15_sign, load_private_key
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/oscrypto/asymmetric.py", line 19, in <module>
    from ._asymmetric import _unwrap_private_key_info
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/oscrypto/_asymmetric.py", line 27, in <module>
    from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/oscrypto/kdf.py", line 9, in <module>
    from .util import rand_bytes
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/oscrypto/util.py", line 14, in <module>
    from ._openssl.util import rand_bytes
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/oscrypto/_openssl/util.py", line 6, in <module>
    from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/oscrypto/_openssl/_libcrypto.py", line 9, in <module>
    from ._libcrypto_cffi import (
  File "/home/kali/tools/msldap/msldap/lib/python3.11/site-packages/oscrypto/_openssl/_libcrypto_cffi.py", line 44, in <module>
    raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto

It seems that the version 1.3.0 of oscrypto on PyPi does not yet support Python 3.11.

Setting up a venv and installing oscrypt from source with pip install 'oscrypto @ git+https://github.com/wbond/oscrypto.git' resolves the issue. This is also mentioned as an issue on the oscrypto GitHub page: wbond/oscrypto#78.

Even though this error is caused by a dependency I thought i'd drop this here for other people running into the same issue.

@skelsec
Copy link
Owner

skelsec commented Oct 8, 2023

Hello, thank you reporting.
This issue was known for a while now, but as you stated it's a 3rd party package and fixing this is out of my control as of now.

@skelsec
Copy link
Owner

skelsec commented Dec 8, 2023

Thank you for the headsup.
Installing the new version of the asyauth library from github or pip should fix the issue.

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