Blog

Upgrading Openssl on Mac OS X 10.6.6 for Node 0.4.1

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

  1. Download and unzip openssl-1.0.0d.tar.gz
  2. cd into the freshly unzipped folder

  3. configure for installation by running the following command:

    ./config
    

    (by default openssl is installed into /usr/local/ssl)

  4. setup the make file by running the following command:

    make
    

  5. install by running the following command:

    sudo make install 
    

  6. add the following to your PATH environment variable:

    /usr/local/ssl/bin 
    



Recompiling Node:

  1. 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
    

  2. Then I simply reinstalled via brew:

    brew install node