openssl3.2/test/certs - 010 - 768-bit key

文章目录

    • [openssl3.2/test/certs - 010 - 768-bit key](#openssl3.2/test/certs - 010 - 768-bit key)
    • 概述
    • 笔记
    • END

openssl3.2/test/certs - 010 - 768-bit key

概述

openssl3.2 - 官方demo学习 - test - certs

笔记

// \file my_openssl_linux_log_doc_010.txt

// \note openssl3.2/test/certs - 010 - 768-bit key

// --------------------------------------------------------------------------------

// 官方原始脚本

// --------------------------------------------------------------------------------

// openssl3.2/test/certs - 010 - 768-bit key

OPENSSL_KEYBITS=768 ./mkcert.sh genroot "Root CA" root-key-768 root-cert-768

// --------------------------------------------------------------------------------

// openssl命令行整理/分析

// --------------------------------------------------------------------------------

// cmd1

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

用 xx_keygen_bits选项参数来决定密钥位数

// cmd2

config file = config_cmd2.txt

string_mask=utf8only

req

prompt = no

distinguished_name = dn

dn

CN = Root CA

// 使用的配置文件中, 如果哪一行有语法错误, 即使这行openssl操作用不到, 也会引起openssl报错退出.

openssl req -new -sha256 -key root-key-768.pem -config config_cmd2.txt -out root-key-768-req.pem

// cmd3

config file = extfile_cmd3.txt

basicConstraints = critical,CA:true

keyUsage = keyCertSign,cRLSign

subjectKeyIdentifier = hash

authorityKeyIdentifier = keyid

openssl x509 -req -sha256 -out root-cert-768.pem -extfile extfile_cmd3.txt -signkey root-key-768.pem -set_serial 1 -days 36525 -in root-key-768-req.pem

// --------------------------------------------------------------------------------

// 改版后的openssl入口日志

// --------------------------------------------------------------------------------

// cmd1

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

// cmd2

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

-config /dev/fd/63 => /home/lostspeed/openssl/openssl-3.2.0_debian/test/certs/my_openssl_linux_log.txt

string_mask=utf8only

req

prompt = no

distinguished_name = dn

dn

CN = Root CA

// cmd3

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

-extfile /dev/fd/63 => /home/lostspeed/openssl/openssl-3.2.0_debian/test/certs/my_openssl_linux_log.txt

basicConstraints = critical,CA:true

keyUsage = keyCertSign,cRLSign

subjectKeyIdentifier = hash

authorityKeyIdentifier = keyid

END

相关推荐
Lsetea12 小时前
部署证书后提示“证书名称与输入不匹配”:Safari 报错的三层排查
nginx·https·safari·ssl证书·openssl
Lsetea1 天前
OpenSSL快速生成域名证书:含SAN的自签命令、验证与排错
nginx·https·ssl证书·openssl·自签证书
Lsetea5 天前
CDN换了SSL证书仍显示旧证书?按边缘节点、SNI和缓存逐层排查
https·cdn·ssl证书·openssl·tls
Lsetea6 天前
Nginx HTTPS证书域名不匹配:用SAN与SNI定位 ERR_CERT_COMMON_NAME_INVALID
nginx·https·ssl证书·openssl·tls
bosins10 天前
Windows IIS 配置本地HTTPS 全流程指南:自签名证书 + 端口绑定 + 避坑详解
powershell·openssl
Lsetea14 天前
Nginx报SSL_CTX_use_PrivateKey failed:证书与私钥不匹配怎么排查
nginx·https·ssl证书·openssl·私钥
Lsetea16 天前
SSL证书快过期怎么自动检查:用OpenSSL checkend做7天预警与线上证书验收
https·ssl证书·openssl·systemd·证书监控
蜡台1 个月前
本机 局域网 搭建本地 HTTPS 域名完整方案
网络协议·http·https·openssl
qetfw1 个月前
Debian OpenSSL CA 证书配置参考:根证书、服务证书与验证
linux·debian·ssl·openssl
qetfw1 个月前
Debian OpenSSL 搭建 CA 证书服务:签发、吊销与客户端信任
linux·debian·openssl·ca