I need to install emq recently, and found that the version of openssl is low, combined with the information searched on the Internet. Do an installation step to ensure success.

Check version

 openssl version 

# 返回结果
OpenSSL 1.0.2k-fips  26 Jan 2017

Install build tools

 yum install -y wget gcc make unzip

Download, compile and install

Download the latest version, 1.xx, from https://github.com/openssl/openssl/releases .

 # 下载
wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1n.zip

# 解压
unzip OpenSSL_1_1_1n.zip

# 切换目录
cd openssl-OpenSSL_1_1_1n

# 配置安装目录
./config --prefix=/usr/local/openssl

# 编译安装
make && make install

change version

 mv /usr/bin/openssl /usr/bin/openssl.old
mv /usr/lib64/openssl /usr/lib64/openssl.old
mv /usr/lib64/libssl.so /usr/lib64/libssl.so.old
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
ln -s /usr/local/openssl/lib/libssl.so /usr/lib64/libssl.so
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
ldconfig -v

National secret algorithm detection

 # 检查 SM3 哈希校验和
echo -n "abc" | openssl dgst -SM3

# 检查椭圆曲线是否包含SM2
openssl ecparam -list_curves | grep SM2

# 检查对称算法
openssl enc -ciphers |grep '\-sm'

bluesbruce
215 声望17 粉丝

引用和评论

0 条评论