Remove previous openssl installation
$ sudo apt-get remove openssl libssl-dev
Install openssl 1.0.1c from source
$ tar -xvf openssl-w.x.yz.tar.gz
$ cd openssl-w.x.yz
$ ./config --prefix=/usr
$ sudo make install
$ sudo apt-get remove openssl libssl-dev
$ tar -xvf openssl-w.x.yz.tar.gz
$ cd openssl-w.x.yz
$ ./config --prefix=/usr
$ sudo make install