/usr/bin/openssl genrsa 4096 > private.key
/usr/bin/openssl req -new -key private.key
对于多域证书请求,您将为SubjectAltName条目san.cfg创建一个配置。
Domain: | |
Country: | |
State: | |
City: | |
Company: | |
E-Mail: | |
Extra Domains |
[ req ]
default_bits = 4096
default_keyfile = private.key
distinguished_name = req_distinguished_name
attributes = req_attributes
prompt = no
[ req_distinguished_name ]
C = CA
ST = AB
L = St. Albert
O = JBMC-Software
CN = domain.com
emailAddress = my@email.com
[ req_attributes ]
[SAN]
subjectAltName=DNS:domain.com,DNS:www.domain.com,DNS:otherdomain.com,DNS:www.otherdomain.com
/usr/bin/openssl req -new -sha256 -key private.key -subj "/CN=domain.com" -reqexts SAN -config san.cfg