Update to work with Node 0.8.*, including building with node-gyp and handling both ways OpenSSL can be used.
First attempt to make `node-gyp` work.
Attempt to conditionally change `include_dirs`.
Also prefer single quotes here, to be a good team player.
Move the `conditions` section.
Improved error checking.
This accounts for observed differences between different versions of
OpenSSL, opting for a consistent error message coming from Ursa, rather
than just letting the OpenSSL error bubble up.
I actually think this should still work for Node 0.6.*.
Add default for `node_shared_openssl`.
It's not defined in 0.6 and earlier, and the behavior in those versions
is to always build with shared OpenSSL.
Handle both variants of key generation.
This keys off of the OpenSSL version number, which seems to be the most
reliable way to know whether it's safe to use the newer function.
Add compatibility note.
What's going wrong, and on what OS and version of Node? It worked for me in my testing (on Linux, with Node 0.6.17 built from source).
Trying to install it on Cloud9, which uses Node.js 0.6.19, results in the following error:
ERR! Error: EXDEV, link '/usr/lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/gyptest.pyc'
It might be an OpenShift problem, according to this thread: https://openshift.redhat.com/community/forums/openshift/node-bcrypt-module-fails-to-install
0.6.9 installs without any problems.
Ok, not much I can do about it then, I think. I'd just specify ~0.6.2 as the version of Ursa. Functionally it should be the same as 0.7.0.