Subject Alternative Name missing in certificate and key files


#1

I was succesffully asking and implementing letsencrypt certificate for my tomcat instance for www.projet-okinawa.ch.
The first request was for www.projet-okinawa.ch domain name only that correspond to what it is used externally to acces our web site externally.
The Fully Qualified Domain Name of the server is however different. It is constrained by our virtual host provider.
This is why we requested a certificate a second time by asking it for two domain name (-d www.projet-okinawa.ch -d os-vps133.infomaniak.ch). Everything went well. The command executed sucessfully. But when I explore the certificate or the key files I can see only one Subject Alternate Name (www.projet-okinawa.ch), the one that correspond to the subject and the first one that was asking for. Is it a bug ? or maybe I did something wrong ?

Extract from openssl x509 -text -in fullchain.pem
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
01:6c:46:5f:64:94:43:3e:9f:80:b1:33:2b:97:09:09:21:8b
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=US, O=Let’s Encrypt, CN=Let’s Encrypt Authority X1
Validity
Not Before: Mar 12 09:46:00 2016 GMT
Not After : Jun 10 09:46:00 2016 GMT
Subject: CN=www.projet-okinawa.ch

X509v3 Subject Alternative Name:
DNS:www.projet-okinawa.ch
X509v3 Certificate Policies:
Policy: 2.23.140.1.2.1
Policy: 1.3.6.1.4.1.44947.1.1.1
CPS: http://cps.letsencrypt.org
User Notice:
Explicit Text: This Certificate may only be relied upon by Relying Parties and only in accordance with the Certificate Policy found at https://letsencrypt.org/repository/


#2

Your most recent certificate has both:

https://crt.sh/?id=15117526

I’m not sure what happened with your original certificate.


#3

I just created a new series for an another server and everything went well. Both domains are registered correctly in my keystore. I added the two domains in the first request.
#7: ObjectId: 2.5.29.17 Criticality=false
SubjectAlternativeName [
DNSName: openam.projet-okinawa.org
DNSName: os-vps134.infomaniak.ch
]

I suspect Letsencrypt store old content into files in /etc/letsencrypt/{domain-name}. I saw the file last update date was correct. Is it a way to solve this ? Can I delete the files generated and request again ?


#4

Did you reload your webserver configuration after issuing the second certificate?


#5

Yes the server was restarted and is running but with the content of the first certificate delivered, I mean without the two SAN.


#6

What path are you using in your server configuration? Earlier you specified I suspect Letsencrypt store old content into files in /etc/letsencrypt/{domain-name}. but this can’t be true: it’s either /etc/letsencrypt/live/{domain-name} (which contains symbolic links which should be updated at renewal) ór /etc/letsencrypt/archive/{domain-name}. (Which contains the actual certificates, but where the file names aren’t updated at renewal, just the new cert added…)


#7

Sorry it was an error by typing /etc/letsencrypt/live/{domain-name} was the correct location.


#8

You should check if the symlink links to the correct version of your certificate in the /archive/ directory.


#9

I found the correct files under …/archive/www.projet-okinawa.ch and cert2.pem chain2.pem fullchain2.pem privkey2.pem. All the files are containing the two domains. So you are right, the symbolink link was broken or incorrect for some reason. I don’t know why.