cocagne / pysrp

Python implementation of the Secure Remote Password protocol (SRP)
MIT License
113 stars 42 forks source link

Python crashes on MacOS Catalina 10.15.4 due libssl.dylib import #42

Closed nikitastupin closed 3 years ago

nikitastupin commented 4 years ago

Steps to reproduce

  1. On MacOS Catalina install pysrp with pip install srp
  2. python3 -c 'import srp'

Root cause

https://github.com/cocagne/pysrp/blob/34bc95e0aad3daf3a8efcfa699243fcc082324ea/srp/_ctsrp.py#L149

Possible solutions

  1. Use openssl provided by Homebrew ln -s /usr/local/opt/openssl@1.1/lib/libssl.dylib /usr/local/lib/libssl.dylib.
  2. Specify libssl version while importing (e.g. libssl.46.dylib) here: https://github.com/cocagne/pysrp/blob/34bc95e0aad3daf3a8efcfa699243fcc082324ea/srp/_ctsrp.py#L149
space55 commented 3 years ago

Hello,

I'm facing this issue above after switching from srptools to this library (yes, it's me from my comment earlier under jslib).

Is there a "proper" resolution to this?

Thanks!