wbond / oscrypto

Compiler-free Python crypto library backed by the OS, supporting CPython and PyPy
MIT License
318 stars 71 forks source link

Failing to load libcrypto #42

Closed pr0x1ma-byte closed 4 years ago

pr0x1ma-byte commented 4 years ago

I'm having trouble on MacOS 10.15.3 with this line and version 1.1.1/1.2.0 on python 3.6.8

from oscrypto import asymmetric

I'm getting the following error:

dlopen(/usr/local/lib/libcrypto.42.dylib, 6): image not found

It does appear to be in/usr/lib

caraiz commented 4 years ago

Hi, i have the same problem. To ignore the error i have changed in "_mac/util.py" the exception "LibraryNotFoundError" to "Exception" because the import is throwing an OSError

wbond commented 4 years ago

Ah, interesting. You must have OpenSSL installed in /usr/local/lib, which is first being found, but then it is trying to use the LibreSSL install. We'll probably need to explicitly check and see if the returned libcrypto.dylib is exactly /usr/lib/libcrypto.dylib. If not, we shouldn't touch it.

wbond commented 4 years ago

This seems to be the same issue as #41.

wbond commented 4 years ago

This should be fixed by c184e9013d280107d59f0622d6258b4813348fc8