I am trying to generate a certificate for serving both from
localhost and other names
I used the following commands
openssl genrsa -out nebula3.key 1024 openssl req -key nebula3.key -new -out nebula3.req -subj '/C=RU/ST=Moscow/L=Moscow/O=In The Moon Network/OU=/CN=nebula3/emailAddressemail@example.com/subjectAltName=DNS.1=localhost,DNS.2=nebula3.inthemoon.net' openssl x509 -req -in nebula3.req -CA In+The+Moon+Authority.crt -CAkey In+The+Moon+Authority.key -CAserial file.srl -out nebula3.pem
In The Moon Authority.crt and
In The Moon Authority.key are my own generated and self-signed CA.
Now I got certificate with
# openssl x509 -noout -subject -in nebula3.pem subject= /C=RU/ST=Moscow/L=Moscow/O=In The Moon Network/CN=nebula3/emailAddressfirstname.lastname@example.org/subjectAltName=DNS.1=localhost,DNS.2=nebula3.inthemoon.net
unfortunately, when I am trying to serve with this certificate from
localhost I get the following error
looks like Firefox doesn't like this certificate although it has
localhost in alternative names.
May be I put incorrect SAN type? I see
DNS here, which looks like type. What are other types possible and what is theis syntax?
In some web-ui I saw the following 4 types:
How can I specify them in command line? May be I could use