Stunnel no longer works after upgrading to Yosemite

715 views Asked by At

I've been using stunnel for local Django development on SSL-enabled pages for a while, but since upgrading to Yosemite it seems to have stopped working:

$ sudo stunnel stunnel/dev_https
dyld: Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
  Referenced from: /usr/bin/stunnel
  Reason: image not found

I tried building libssl from source using this gist and symlinking libssl.1.0.0.dylib to /opt/local/lib/libssl.1.0.0.dylib. That then failed, looking for /opt/local/lib/libcrypto.1.0.0.dylib. So I symlinked the version I'd just built to that expected path, and got this:

$ sudo stunnel stunnel/dev_https
dyld: Library not loaded: /usr/local/ssl/lib/libcrypto.1.0.0.dylib
  Referenced from: /opt/local/lib/libssl.1.0.0.dylib
  Reason: image not found

What's going on here? stunnel is at /usr/bin/stunnel and I've checked it's not installed via homebrew. Has anyone else managed to work this out?

1

There are 1 answers

0
groovecoder On

I just got stunnel working for Django on Yosemite. If I remember correctly, I also had to previously fix my libssl as explained in this other answer for psycopg2.

Then, I use homebrew for everything:

$ brew install stunnel
$ openssl req -new -x509 -days 9999 -nodes -out stunnel.pem -keyout stunnel.pem

I put this in stunnel.conf (derived from here):

pid=/tmp/stunnel.pid
setuid=nobody
setgid=nobody
foreground=yes
client=no

[https]
cert = ./stunnel.pem
accept=443
connect=5000

I run stunnel with:

$ sudo stunnel stunnel.conf

And run Django with:

$ python manage.py runserver 0.0.0.0:5000

Hope that helps.