Please find the below steps to update openssl on your server:
1. Check your openssl version
# openssl version
You will get an output like this:
OpenSSL 1.0.Xx XX Xxx 20XX
2. Download the latest version of openssl from:
… and upload it to your server.
or you may command
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz (This was the latest version at the moment we wrote this article)
3. Extract openssl-1.0.1g.tar.gz
Go to openssl-1.0.1g directory
# make clean
# ./config shared –prefix=/usr –openssldir=/usr/local/openssl
# make && make test
# make install
5. Check the if you you have the latest version. Thus the openssl is updated to the latest one, and if not reboot your machine and check again.