I recently ran into the following error when trying to use connect for node:
node-crypto : Unknown message digest sha256
The problem was that my machine's openssl version did not support sha256.
The solution? Upgrade openssl and then recompile node.
Upgrading Openssl
- Download and unzip openssl-1.0.0d.tar.gz
- cd into the freshly unzipped folder
- configure for installation by running the following command:
./config(by default openssl is installed into /usr/local/ssl)
- setup the make file by running the following command:
make - install by running the following command:
sudo make install - add the following to your PATH environment variable:
/usr/local/ssl/bin
Recompiling Node:
- I use the package manager homebrew so to uninstall node I simply needed to remove the folder containing the version of node I wanted to recompile. I ran the following command:
rm -rf /usr/local/Cellar/node/0.4.1 - Then I simply reinstalled via brew:
brew install node