生成 CSR(RSA 与 ECC)
生成 CSR(RSA 与 ECC)
openssl req -new -newkey rsa:2048 -nodes -keyout site.key -out site.csr -subj "/C=CN/ST=Zhejiang/L=Hangzhou/O=Example/CN=example.com"
# 带 SAN 推荐用配置文件:openssl req -new -key site.key -out site.csr -config san.cnf
# ECC 示例:openssl ecparam -genkey -name prime256v1 -out site.key && openssl req -new -key site.key -out site.csr检查 CSR
检查 CSR
openssl req -in site.csr -noout -verify -subject
openssl req -in site.csr -noout -text | grep -A2 'Subject Alternative Name'现代 CA 以 CSR 里的 SAN 为准,CN 可被忽略;申请前把域名写全,省去来回返工。