Skip to content

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

@MaxRozendaal

Description

@MaxRozendaal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions