I am trying to generate a certificate for serving both from localhost and other namesI used the following commandsopenssl genrsa -out nebula3.key 1024openssl req -key nebula3.key -new -out nebula3.req -subj '/C=RU/ST=Moscow/L=Moscow/O=In The Moon Network/OU=/CN=nebula3/emailAddress=dims12@mail.ru/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.pemFiles 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.pemsubject= /C=RU/ST=Moscow/L=Moscow/O=In The Moon Network/CN=nebula3/emailAddress=dims12@mail.ru/subjectAltName=DNS.1=localhost,DNS.2=nebula3.inthemoon.netunfortunately, when I am trying to serve with this certificate from localhost I get the following errorlooks 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 IP?
The certificate is not valid for the name localhost
openssl;certificates