1、查看源版本
# openssl version OpenSSL 1.0.1e-fips 11 Feb 2013
2、下载安装openssl-fips-2.0.13
# wget -c https://www.openssl.org/source/openssl-fips-2.0.13.tar.gz # yum -y install perl gcc # tar xf openssl-fips-2.0.13.tar.gz # cd openssl-fips-2.0.13 # ./config && make && make install # cd ..
3、下载安装openssl-1.0.2j
# wget -c https://www.openssl.org/source/openssl-1.0.2j.tar.gz # yum install -y zlib-devel zlib # tar xf openssl-1.0.2j.tar.gz # cd penssl-1.0.2j # ./config shared zlib fips # make && make install # cd ..
4、更新并备份原openssl
# mv /usr/bin/openssl /usr/bin/openssl-1.0.1e # mv /usr/include/openssl /usr/include/openssl-1.0.1e # ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl # ln -s /usr/local/ssl/include/openssl usr/include/openssl # echo "/usr/local/ssl/lib" > /etc/ld.so.conf.d/openssl-1.0.2j.conf
5、验证升级是否成功
# openssl version OpenSSL 1.0.2j-fips 26 Sep 2016