openssl3.2/test/certs – 020 – Intermediate CA security variants: MD5 issuer signature

文章目录

    • openssl3.2/test/certs - 020 - Intermediate CA security variants: MD5 issuer signature
    • 概述
    • 笔记
    • END

openssl3.2/test/certs - 020 - Intermediate CA security variants: MD5 issuer signature

概述

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

笔记

// file my_openssl_linux_log_doc_020.txt
//
ote openssl3.2/test/certs - 020 - Intermediate CA security variants: MD5 issuer signature

// --------------------------------------------------------------------------------
// 官方脚本
// --------------------------------------------------------------------------------
// openssl3.2/test/certs - 020 - Intermediate CA security variants: MD5 issuer signature

// root-cert.pem, root-key.pem from exp 001
OPENSSL_SIGALG=md5 ./mkcert.sh genca “CA” ca-key ca-cert-md5 root-key root-cert

openssl x509 -in ca-cert-md5.pem -trustout -addtrust anyExtendedKeyUsage -out ca-cert-md5-any.pem

// --------------------------------------------------------------------------------
// openssl 命令行整理/分析
// --------------------------------------------------------------------------------
// config file = config_exp020_cmd1.txt
string_mask=utf8only
[req]
prompt = no
distinguished_name = dn
[dn]
CN = CA

// cmd1
openssl req -new -md5 -key ca-key.pem -config config_exp020_cmd1.txt -out ca-key-req.pem

// cmd2
config file = extfile_exp020_cmd2.txt
basicConstraints = critical,CA:true
keyUsage = keyCertSign,cRLSign
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid

openssl x509 -req -md5 -out ca-cert-md5.pem -extfile extfile_exp020_cmd2.txt -CA root-cert.pem -CAkey root-key.pem -set_serial 2 -days 36525 -in ca-key-req.pem

// cmd3
openssl x509 -in ca-cert-md5.pem -trustout -addtrust anyExtendedKeyUsage -out ca-cert-md5-any.pem

// --------------------------------------------------------------------------------
// openssl 日志
// --------------------------------------------------------------------------------
openssl req -new -md5 -key ca-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 = CA
openssl x509 -req -md5 -out ca-cert-md5.pem -extfile /dev/fd/63 -CA root-cert.pem -CAkey root-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

basicConstraints = critical,CA:true
keyUsage = keyCertSign,cRLSign
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid
openssl x509 -in ca-cert-md5.pem -trustout -addtrust anyExtendedKeyUsage -out ca-cert-md5-any.pem

END