openssl3.2/test/certs - 002 - root cert variants: CA:false, key2, DN2, expired

文章目录

    • [openssl3.2/test/certs - 002 - root cert variants: CA:false, key2, DN2, expired](#openssl3.2/test/certs - 002 - root cert variants: CA:false, key2, DN2, expired)
    • 概述
    • 笔记
    • END

openssl3.2/test/certs - 002 - root cert variants: CA:false, key2, DN2, expired

概述

索引贴 openssl3.2 - 官方demo学习 - test - certs

笔记

--官方原始脚本

openssl3.2/test/certs - 002 -

root cert variants: CA:false, key2, DN2, expired root cert variants: CA:false, key2, DN2, expired

./mkcert.sh genss "Root CA" root-key root-nonca

--得到的原始命令行

openssl genpkey -algorithm rsa -pkeyopt rsa_keygen_bits:2048 -out root-key.pem

openssl req -new -sha256 -key root-key.pem -config /dev/fd/63

openssl x509 -req -sha256 -out root-nonca.pem -extfile /dev/fd/63 -signkey root-key.pem -set_serial 1 -days 36525

--从管道保存下来的配置文件

--config_param.txt

bash 复制代码
string_mask=utf8only
[req]
prompt = no
distinguished_name = dn
[dn]
CN = Root CA

--extfile_param.txt

bash 复制代码
subjectKeyIdentifier   = hash
authorityKeyIdentifier = keyid, issuer
basicConstraints = CA:false
extendedKeyUsage = serverAuth
subjectAltName = @alts
[alts]
DNS=Root CA

--自己修改的命令行

--cmd 001

openssl genpkey -algorithm rsa -pkeyopt rsa_keygen_bits:2048 -out root-key.pem

命令行含义:

产生私钥, 算法为rsa, 私钥位数2048, 输出为root-key.pem

-cmd 002

openssl req -new -sha256 -key root-key.pem -config config_param.txt -out root_req.pem

命令行含义:

生成新的证书请求文件, 摘要算法为sha256, 私钥文件=root-key.pem, 配置文件=config_param.txt,

输出文件=root_req.pem

-cmd 003

openssl x509 -req -sha256 -out root-nonca.pem -extfile extfile_param.txt -signkey root-key.pem -set_serial 1 -days 36525 -in root_req.pem

命令行含义:

生成证书(x509请求), 摘要算法=sha256, 输出文件=root-nonca.pem, 扩展文件=extfile_param.txt

签名私钥=root-key.pem, 证书序列号=1, 证书有效期(天)=36525

证书请求文件=root_req.pem

END

相关推荐
fangeqin2 天前
ubuntu源码安装python3.13遇到Could not build the ssl module!解决方法
linux·python·ubuntu·openssl
API开发13 天前
苹果芯片macOS安装版Homebrew(亲测) ,一键安装node、python、vscode等,比绿色软件还干净、无污染
vscode·python·docker·nodejs·openssl·brew·homebrew
码农不惑17 天前
Rust使用tokio(二)HTTPS相关
https·rust·web·openssl
liulilittle22 天前
通过高级处理器硬件指令集AES-NI实现AES-256-CFB算法并通过OPENSSL加密验证算法正确性。
linux·服务器·c++·算法·安全·加密·openssl
liulilittle24 天前
OpenSSL 的 AES-NI 支持机制
linux·运维·服务器·算法·加密·openssl·解密
liulilittle25 天前
通过高级处理器硬件指令集AES-NI实现AES-256-CFB算法。
linux·服务器·c++·算法·安全·加密·openssl
花花少年1 个月前
Ubuntu系统下交叉编译openssl
openssl·交叉编译
什么名字都被用了2 个月前
编译openssl源码
c++·openssl
toooooop82 个月前
openssl_error_string() 不要依赖错误信息作为逻辑判断
php·openssl
whoarethenext2 个月前
加密认证库openssl初始附带c/c++的使用源码
c语言·网络·c++·openssl