| 内容 | 公钥、主体 DN(C/ST/L/O/OU/CN)、扩展请求(SAN)、自签名 |
|---|---|
| 生成 | openssl req -new -key key.pem -out req.csr |
| 校验 | openssl req -in req.csr -noout -text -verify |
| 要点 | 现代浏览器以 SAN 为准,CN 只作兼容显示 |
生成带 SAN 的 CSR
生成带 SAN 的 CSR
openssl req -new -key example.com.key -out example.com.csr -subj "/C=CN/O=Example/CN=example.com" -addext "subjectAltName=DNS:example.com,DNS:www.example.com"CSR 只含公钥,可以按流程传输;私钥始终留在本地,不要随 CSR 一起提交。