bg-tutorials

OpenSSL 教程

在本节中,您将找到我们的 OpenSSL 指南:在 Windows 和 Ubuntu 上安装 OpenSSL、检查当前运行的版本、生成自签名证书,以及检查证书的过期时间。


如何在 Windows 上安装 OpenSSL

Windows 系统不自带 OpenSSL,因此需要自行安装。本指南涵盖如何选择合适的版本、运行安装程序、将 OpenSSL 添加到 PATH 环境变量以便在任何终端中都能使用该命令,以及修复安装后通常会出现的错误。


如何在 Ubuntu 上安装 OpenSSL

大多数 Ubuntu 系统都已预装 OpenSSL,但版本未必符合您的需求。本指南涵盖了三种安装方式:使用 apt 安装、从源代码编译特定版本,以及在 Docker 容器中运行 OpenSSL,并说明如何确认您最终使用的是哪个版本。


如何在 Linux、Windows 和 Mac 上检查 OpenSSL 版本

openssl version 命令可以告诉您当前运行的版本,但其单行输出会遗漏一些您经常需要的细节,例如构建日期以及 OpenSSL 读取配置和证书的目录。本指南涵盖了各平台上的相关命令、可显示更多信息的标志参数,以及如何升级已不再受支持的版本。


如何使用 OpenSSL 生成自签名证书

自签名证书是您自己签发给自己的证书。浏览器不会自动信任它,因此它不适合用于公开网站,但它是在开发或测试环境中快速启用 HTTPS 的最便捷方法。本指南涵盖了具体命令、值得调整的选项,以及如何让您自己的设备信任您创建的证书。


如何使用 OpenSSL 检查 SSL 证书的过期日期

2026 年 3 月 15 日之后签发的证书有效期上限为 200 天,而这一上限在 2027 年 3 月还会再降至 100 天,因此续期的频率将远高于以往。一旦证书过期,每位访问者都会看到整页的安全警告。本指南涵盖了如何在正在运行的服务器上以及本地文件中检查过期日期、如何解读输出结果,以及如何通过脚本自动完成检查,而无需手动追踪日期。


立即订购 SSL 证书, 可节省 10% 的费用!

快速发行, 强大加密, 99.99% 的浏览器信任度, 专业支持和 25 天退款保证. 优惠券代码 SAVE10

龙飞行的详细图像
撰写人

I've been building and managing websites for over 20 years, with a heavy focus on the technical side of the cybersecurity, VPN, and SaaS industries. I know how sites are built from the ground up, which means I know how to secure them. Here at SSL Dragon, I write about web architecture, encryption, and keeping your infrastructure safe.

Avatar of Sergiu Rosca
Technical Review by Sergiu Rosca

Sergiu Rosca is the core web developer behind SSL Dragon. He manages the technical infrastructure, platform performance, and backend integrations that keep the site running smoothly and securely. At SSL Dragon, Sergiu shares practical insights on web development, site optimization, and technical troubleshooting.

All SSL Dragon installation guides are tested on live server environments and undergo a strict peer-review process to ensure your infrastructure remains secure. Read our full Editorial Policy.