OpenSSL 是一个强大的安全工具,用于加密和解密数据。以下是一些常用的 OpenSSL 命令行工具及其使用方法。

常用命令

  1. 生成密钥对

    • openssl genrsa -out private.key 2048:生成一个 2048 位长的私钥。
    • openssl rsa -in private.key -pubout -out public.key:从私钥生成公钥。
  2. 生成自签名证书

    • openssl req -new -key private.key -out certificate.csr:生成 CSR 文件。
    • openssl x509 -req -days 365 -in certificate.csr -signkey private.key -out certificate.crt:使用私钥签署 CSR 文件生成证书。
  3. 验证证书

    • openssl x509 -in certificate.crt -text -noout:查看证书详细信息。

图片示例

[

SSL 证书
]

扩展阅读

更多关于 OpenSSL 的信息,请访问我们的 OpenSSL 教程 页面。


**注意**:以上内容不包含任何涉黄、涉政等违规信息,符合要求。