You can try using MacPorts:
port install libffi port install openssl
You can then locate the installed libraries using:
port contents libname
And use a symbolic link if Python expects to find the lib somewhere else, Eg:
ln -s /usr/local/lib/libssl.1.0.0.dylib /usr/lib/... [expected location, cf errors msg]