openssl3.2/test/certs - 031 - purpose variants: clientAuth

文章目录

    • [openssl3.2/test/certs - 031 - purpose variants: clientAuth](#openssl3.2/test/certs - 031 - purpose variants: clientAuth)
    • 概述
    • 笔记
    • END

openssl3.2/test/certs - 031 - purpose variants: clientAuth

概述

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

笔记

/*!

\file my_openssl_linux_log_doc_031.txt

\note openssl3.2/test/certs - 031 - purpose variants: clientAuth

*/

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

// official bash script

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

// openssl3.2/test/certs - 031 - purpose variants: clientAuth

./mkcert.sh genee -p clientAuth server.example ee-key ee-client ca-key ca-cert

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

// openssl cmd line parse

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

// cmd 1

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

// cmd 2

// config file = cfg_exp031_cmd2.txt

string_mask=utf8only

req

prompt = no

distinguished_name = dn

dn

CN = server.example

openssl req -new -sha256 -key ee-key.pem -config cfg_exp031_cmd2.txt -out ee-key-req.pem

// cmd 3

// config file = cfg_exp031_cmd3.txt

subjectKeyIdentifier = hash

authorityKeyIdentifier = keyid, issuer

basicConstraints = CA:false

extendedKeyUsage = clientAuth

alts

subjectAltName = @alts

DNS=server.example

alts

openssl x509 -req -sha256 -out ee-client.pem -extfile cfg_exp031_cmd3.txt -CA ca-cert.pem -CAkey ca-key.pem -set_serial 2 -days 36525 -in ee-key-req.pem

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

// openssl log

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

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

openssl req -new -sha256 -key ee-key.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 = server.example

openssl x509 -req -sha256 -out ee-client.pem -extfile /dev/fd/63 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 2 -days 36525

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

subjectKeyIdentifier = hash

authorityKeyIdentifier = keyid, issuer

basicConstraints = CA:false

extendedKeyUsage = clientAuth

alts

subjectAltName = @alts

DNS=server.example

alts

END

相关推荐
特立独行的猫a4 天前
[鸿蒙PC命令行程序移植实战]:交叉编译移植最新openSSL 4.0.0到鸿蒙PC
华为·harmonyos·移植·openssl·交叉编译·鸿蒙pc
十五年专注C++开发8 天前
CMake进阶:vcpkg中OpenSSLConfig.cmake详解
c++·windows·cmake·openssl·跨平台编译
一个平凡而乐于分享的小比特8 天前
OpenSSL 全面解析:从入门到精通
密码学·openssl·隐私安全
mooyuan天天12 天前
万字详解心脏滴血漏洞复现:原理详解+环境搭建+渗透实践(CVE-2014-0160)
openssl·心脏滴血漏洞·cve-2014-0160
bkspiderx17 天前
OpenSSL全解析:从基础原理到交叉编译与实战应用
openssl
ZXF_H1 个月前
C/C++ OpenSSL自适应格式解析证书二进制字节流
c语言·开发语言·c++·openssl
龚建波1 个月前
记录:vcpkg清单模式安装指定版本的curl和OpenSSL
openssl·curl·vcpkg
YouEmbedded1 个月前
解码ARM 开发板 OpenSSL+cURL 交叉编译与 HTTPS 配置
https·openssl·curl
吃西瓜的星星1 个月前
从0开始完成ActiveMQ-cpp在windows_x86平台的编译(从编译openssl开始)
activemq·openssl·c/c++
赖small强2 个月前
【ZeroRange WebRTC】OpenSSL 与 WebRTC:原理、集成与实践指南
webrtc·openssl·x.509·证书验证·tls/dtls