Subject Alternative Names (SAN)

Create an open ssl config file

vim OpenSSL.config

req
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
req_distinguished_name
C = US
ST = State
L = City
O = Company
OU = Unit
CN = public.server.name
v3_req
keyUsage = keyEncipherment, dataEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
alt_names
DNS.1 = server1.test.private
DNS.1 = server2.test.private
IP.1 = 10.9.5.1
IP.2 = 10.9.5.2

Issue the create command command

openssl req -x509 -newkey rsa:2048 -keyout ssl.key/server.key -out ssl.crt/server.crt -days 928 -nodes -config OpenSSL.config

Comments