Centos升级OpenSSL教程

2017年10月10日16:23:44系统教程评论1,229

在使用CentOS自带的OpenSSL制作证书文件时,发现居然不支持一些ECC算法,例如BrainpoolP256r1,分析后发现是由于OpenSSL版本过旧造成的,1.0.2版本及后续版本都已经开始支持BrainpoolP256r1算法了。文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

如你在使用OpenSSL也遇到算法不支持或者想升级OpenSSL版本,可以参照以下方法:文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

第一步:查看下当前OpenSSL版本文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

[root@duoluodeyu]# openssl version文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

OpenSSL 1.0.1e-fips 11 Feb 2013文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

第二步:安装必要的软件文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

yum install gcc gcc-c++ autoconf automake zlib zlib-devel pcre-devel文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

第三步:下载并解压 OpenSSL(本文以1.0.2版本为例,其他版本请访问https://www.openssl.org/source/获取下载地址)文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

cd /usr/local/src文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

tar -zxf openssl-1.0.2-latest.tar.gz文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

第四步:编译安装 OpenSSL文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

cd openssl-1.0.2*文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

./config文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

make && make install文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

第五步:移除旧版本 OpenSSL文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

mv /usr/bin/openssl /tmp/文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

最后在查看下OpenSSL版本号,确认是否升级成功。文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

openssl version文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

OpenSSL升级到1.0.2版本即可支持BrainpoolP256r1算法。文章源自堕落的鱼-https://www.duoluodeyu.com/2468.html

匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定