Linux升级openssl

运行acme.sh更新SSL证书时出现报错:Register account Error

具体错误为:

Register account Error: {"type":"urn:ietf:params:acme:error:malformed","status":400,"detail":"[External Account Binding] The JWS Signature MUST be present"}

重装acme.sh无效,后面怀疑为openssl版本问题,升级openssl后问题解决,本文简述openssl升级步骤。

系统环境

Operating System: CentOS Linux 7 (Core)

Kernel: Linux 3.10.0-229.4.2.el7.x86_64

当前OpenSSL版本

openssl version

OpenSSL 1.0.2k-fips 26 Jan 2017

升级步骤

1. 找到需要的openssl版本

打开OpenSSL官网,找到需要的新版本。

官网:

[ Downloads ] - /source/index.html

这里步子不要迈的太大,我们不打算升级到太新的版本,选择的是旧一些的1.1.1版本。

[ 1.1.1 ] - /source/old/1.1.1/index.html

2. 下载openssl代码

wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gz --no-check-certificate

3. 准备编译安装openssl所需的工具

安装依赖

yum install -y zlib zlib-devel

yum install -y gcc

4. 解压openssl代码包并进入其目录

tar -zvxf openssl-1.1.1w.tar.gz

cd openssl-1.1.1w

5. 编译安装

./config --prefix=/usr/local/openssl --openssldir=/usr/local/ssl

make -j 2

make install

6. 备份旧版openssl

mv /usr/bin/openssl /usr/bin/openssl.bak

//这个有些场景不存在

mv /usr/include/openssl /usr/include/openssl.bak

7. 配置软连接到新版本

ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl

ln -s /usr/local/openssl/include/openssl /usr/include/openssl

8. 更新动态链接库数据并重新加载

echo "/usr/local/openssl/lib" >> /etc/ld.so.conf

ldconfig -v

9. 查看是否升级成功

openssl version

OpenSSL 1.1.1w 11 Sep 2023

相关推荐
yuanManGan17 分钟前
走进Linux的世界:初识操作系统(Operator System)
android·linux·运维
i_am_a_div_日积月累_37 分钟前
jenkins打包报错
运维·rust·jenkins·jenkins打包报错
一个处女座的暖男程序猿40 分钟前
2G2核服务器安装ES
服务器·elasticsearch·jenkins
GIOTTO情43 分钟前
舆情处置的自动化实践:基于Infoseek舆情系统的技术解析与落地指南
运维·自动化·linq
Thexhy1 小时前
在 CentOS 7 的 Linux 系统中配置 NFS
linux·运维·学习·centos
咯哦哦哦哦1 小时前
linux vscode+cmake+clangd
linux·ide·vscode
曹天骄1 小时前
Let’s Encrypt 证书申请与多服务器 HTTPS 配置指南
运维·服务器·https
lang201509281 小时前
如何在 Linux 中获取更多信息
linux·运维·服务器
DeBuggggggg1 小时前
linux 安装Python3.9 且支持SSL
linux·运维·ssl
我是标同学1 小时前
vmware17安装ubuntu2204版本qemu运行armv8处理器uboot运行调试(包括windows)的一些工作
linux·运维·服务器