Certificate expired

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

bellevetratescorrevoli.it

I ran this command:

browsing crm (vTiger)

It produced this output:

net::ERR_CERT_DATE_INVALID

My web server is (include version):

Apache/2.4.25 (Debian)

The operating system my web server runs on is (include version):

debian stretch

My hosting provider, if applicable, is:

local

I can login to a root shell on my machine (yes or no, or I don't know):

yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

0.28.0

we recently set the domain name (crm.bellevetratescorrevoli.it) inside our Windows server DNS, because
it was resolved with the public IP, so all our clients were going outside the firewall to get back in, which was non-sense. Now it's resolved with the local IP, but we get at random the certificate expired error when it's not.
Any help?

Thanks a lot

1 Like

Hello @agiorg, welcome to the Let's Encrypt community. :slightly_smiling_face:

Using https://crt.sh/ here is a list of issued certificates crt.sh | bellevetratescorrevoli.it, the latest being 2022-11-17 for api.bellevetratescorrevoli.it. And for crm.bellevetratescorrevoli.it the latest is 2022-10-17.

Is an old version, Certbot 1.32.0 Release

You likely have a DNS issue.
Public facing domain name (crm.bellevetratescorrevoli.it) needs to resolve to a Pubic facing IP Address
for inside you can have the same domain name (crm.bellevetratescorrevoli.it) resolve to an inside facing IP Address to avoid the clients going outside the firewall and back in.

1 Like

The cert was renewed one month ago:


Your system may still be using the previous certificate.

4 Likes

Here is what I see on Windows 10 using Firefox 107.0 (64-bit) for the certificate.

1 Like

https://www.ssllabs.com/ssltest/analyze.html?d=crm.bellevetratescorrevoli.it
I find 2 Certificates

Certificate 1:

Certificate 2:

2 Likes

SSL Labs is different [sometimes much more thorough] than most (if not all) browsers.
It does show two certs but doesn't detail if they were presented within the same connection or were aggregated over multiple tests/connections.
I'm seeing only one cert being presented [at a time].
Perhaps...

  • there is a load-balancer involved
    [which might still have a member serving the old cert]
  • this problem has been rectified
    [which would mean that SSL Labs can't hear a second cert - I'll triple check on that possibility now]

update: SSL Labs still sees the two certs

3 Likes

Thanks all for replying.
I don't understand why 2 certificates, if I type certbot renew it tells me there is nothing to renew,so how to get rid of the old certificate?

1 Like

Check the Apache configuration.
Does it send one or two certificates?

2 Likes

hi, thank you for answering.
I don't even know how to send 2 certificates, here is my apache conf:

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName crm.bellevetratescorrevoli.it
ServerAdmin tecnico@rahona.be
<FilesMatch "\.php$">
  SetHandler "proxy:unix:///var/run/php/php7.0-supercrm-fpm.sock|fcgi://template/"
</FilesMatch>
DocumentRoot /var/www/supercrm/vtiger
<Directory />
                RewriteEngine On
                Options -Indexes
                AllowOverride All
        Require all granted
        </Directory>

ErrorLog ${APACHE_LOG_DIR}/error-vtiger.log
CustomLog ${APACHE_LOG_DIR}/access-vtiger.log combined

<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/crm.bellevetratescorrevoli.it/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/crm.bellevetratescorrevoli.it/privkey.pem
</VirtualHost>
</IfModule>
1 Like

That seems correct.

Is there a load-balancer?
If not, then please show:
ps -ef | grep -Ei 'apache|http' | grep -v grep

2 Likes

no load balancer.

root 1001 1 0 Oct13 ? 00:02:41 /usr/sbin/apache2 -k start
www-data 1012 1001 0 Oct13 ? 00:54:28 /usr/sbin/apache2 -k start
www-data 1174 1001 0 Oct13 ? 03:05:17 /usr/sbin/apache2 -k start
www-data 1290 1001 0 Oct13 ? 01:26:03 /usr/sbin/apache2 -k start
www-data 1321 1001 0 00:07 ? 00:02:19 /usr/sbin/apache2 -k start
www-data 1322 1001 0 00:07 ? 00:04:42 /usr/sbin/apache2 -k start
www-data 22016 1001 2 09:01 ? 00:03:00 /usr/sbin/apache2 -k start

I'm running out of places to look - LOL

Please show the output of:
apachectl -t -D DUMP_VHOSTS

3 Likes

Ok, I finally found a way to prove where the problem is:

Using the IP instead of the name [no SNI]:

Name:    crm.bellevetratescorrevoli.it
Address: 213.174.187.213

with:
openssl s_client -connect 213.174.187.213:443
We are presented with the expired cert:

-----BEGIN CERTIFICATE-----
MIIFQDCCBCigAwIBAgISA4+77j9IptpEuzv/qtya36TrMA0GCSqGSIb3DQEBCwUA
MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD
EwJSMzAeFw0yMjA4MTcxOTA3MzJaFw0yMjExMTUxOTA3MzFaMCgxJjAkBgNVBAMT
HWNybS5iZWxsZXZldHJhdGVzY29ycmV2b2xpLml0MIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEA0j7DIqwhVw6xsQssAY+G3UnU5r+eKY2QP/eTmTLg9MYL
ti+NxVy7zPicn64NQREgzmSqddT8hI0c1c0SlJuWl3sMWHd1Bnt5nNsjQB6/SFLL
h6WpVYQG4U2lvy4jyRkCG/yHp1jF/5qmr7qOCXYB70v4rcQHIjdqrgsuNY7RffJY
qZa/DmKnSYyb48eLgLy7EEFP0fVmd4EFwahycuhRFubdZ0G55Du72JRZs6iPXuwT
lOzQFH0xmM+ilR2uhhID23HE9uiO/T0MFChxkkznlTeN3YBy889pM3PCHrwXPQ67
NGTiz3EDldwqpqguyO+oZhcKuoizyi1JVP3RQM4fEQIDAQABo4ICWDCCAlQwDgYD
VR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNV
HRMBAf8EAjAAMB0GA1UdDgQWBBQhHxDyp1fcicYy2K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TIFICATE-----

3 Likes

ok the question is why:

apachectl -t -D DUMP_VHOSTS
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe2f:7e07. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:443                  crm.bellevetratescorrevoli.it (/etc/apache2/sites-enabled/vtiger-le-ssl.conf:2)
*:80                   is a NameVirtualHost
         default server duplicati (/etc/apache2/sites-enabled/duplicati.conf:1)
         port 80 namevhost duplicati (/etc/apache2/sites-enabled/duplicati.conf:1)
         port 80 namevhost crm.bellevetratescorrevoli.it (/etc/apache2/sites-enabled/vtiger.conf:2)
root@topmedia-crm:/etc/apache2/sites-available# nano /etc/apache2/sites-enabled/duplicati.conf

and also if I do certbot renew:

Processing /etc/letsencrypt/renewal/crm.bellevetratescorrevoli.it.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not yet due for renewal

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The following certs are not due for renewal yet:
  /etc/letsencrypt/live/crm.bellevetratescorrevoli.it/fullchain.pem expires on 2023-01-15 (skipped)
No renewals were attempted.

Let's be 100% certain where the problem is with the output of:
grep -Eri SSLCertificateFile /etc/apache2/

3 Likes

grep -Eri SSLCertificateFile /etc/apache2/

/etc/apache2/sites-available/vtiger-le-ssl.conf:#   the referenced file can be the same as SSLCertificateFile
/etc/apache2/sites-available/vtiger-le-ssl.conf:SSLCertificateFile /etc/letsencrypt/live/crm.bellevetratescorrevoli.it/fullchain.pem
/etc/apache2/sites-available/p.conf:SSLCertificateFile /etc/letsencrypt/live/crm.bellevetratescorrevoli.it/fullchain.pem
/etc/apache2/sites-available/default-ssl.conf:		#   SSLCertificateFile directive is needed.
/etc/apache2/sites-available/default-ssl.conf:		SSLCertificateFile	/etc/ssl/certs/ssl-cert-snakeoil.pem
/etc/apache2/sites-available/default-ssl.conf:		#   the referenced file can be the same as SSLCertificateFile

hmm...

Let's have a look at those files, one at a time.
Let's start with:
cat /etc/apache2/sites-available/vtiger-le-ssl.conf

3 Likes
cat /etc/apache2/sites-available/vtiger-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName crm.bellevetratescorrevoli.it
ServerAdmin tecnico@rahona.be
#RedirectMatch permanent ^/((?!fpm-ping|fpm-status).*)$ https://213.174.187.213/$1
#</VirtualHost>


#<IfModule mod_ssl.c>
#<VirtualHost *:443>
<FilesMatch "\.php$">
  SetHandler "proxy:unix:///var/run/php/php7.0-supercrm-fpm.sock|fcgi://template/"
</FilesMatch>
DocumentRoot /var/www/supercrm/vtiger
<Directory />
                RewriteEngine On
                Options -Indexes
                AllowOverride All
	Require all granted
        </Directory>

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error-vtiger.log
CustomLog ${APACHE_LOG_DIR}/access-vtiger.log combined

#SSLEngine on


#   Server Certificate Chain:
#   Point SSLCertificateChainFile at a file containing the
#   concatenation of PEM encoded CA certificates which form the
#   certificate chain for the server certificate. Alternatively
#   the referenced file can be the same as SSLCertificateFile
#   when the CA certificates are directly appended to the server
#   certificate for convinience.
#SSLCertificateChainFile /etc/letsencrypt/live/rahona.be/chain.pem

#   Certificate Authority (CA):
#   Set the CA certificate verification path where to find CA
#   certificates for client authentication or alternatively one
#   huge file containing all of them (file must be PEM encoded)
#   Note: Inside SSLCACertificatePath you need hash symlinks
# to point to the certificate files. Use the provided
# Makefile to update the hash symlinks after changes.
#SSLCACertificatePath /etc/ssl/certs/
#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt

#   Certificate Revocation Lists (CRL):
#   Set the CA revocation path where to find CA CRLs for client
#   authentication or alternatively one huge file containing all
#   of them (file must be PEM encoded)
#   Note: Inside SSLCARevocationPath you need hash symlinks
# to point to the certificate files. Use the provided
# Makefile to update the hash symlinks after changes.
#SSLCARevocationPath /etc/apache2/ssl.crl/
#SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl

#   Client Authentication (Type):
#   Client certificate verification type and depth.  Types are
#   none, optional, require and optional_no_ca.  Depth is a
#   number which specifies how deeply to verify the certificate
#   issuer chain before deciding the certificate is not valid.
#SSLVerifyClient require
#SSLVerifyDepth  10

#   SSL Engine Options:
#   Set various options for the SSL engine.
#   o FakeBasicAuth:
# Translate the client X.509 into a Basic Authorisation.  This means that
# the standard Auth/DBMAuth methods can be used for access control.  The
# user name is the `one line' version of the client's X.509 certificate.
# Note that no password is obtained from the user. Every entry in the user
# file needs this password: `xxj31ZMTZzkVA'.
#   o ExportCertData:
# This exports two additional environment variables: SSL_CLIENT_CERT and
# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
# server (always existing) and the client (only existing when client
# authentication is used). This can be used to import the certificates
# into CGI scripts.
#   o StdEnvVars:
# This exports the standard SSL/TLS related `SSL_*' environment variables.
# Per default this exportation is switched off for performance reasons,
# because the extraction step is an expensive operation and is usually
# useless for serving static content. So one usually enables the
# exportation for CGI and SSI requests only.
#   o OptRenegotiate:
# This enables optimized SSL connection renegotiation handling when SSL
# directives are used in per-directory context.
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>

#   SSL Protocol Adjustments:
#   The safe and default but still SSL/TLS standard compliant shutdown
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
#   the close notify alert from client. When you need a different shutdown
#   approach you can use one of the following variables:
#   o ssl-unclean-shutdown:
# This forces an unclean shutdown when the connection is closed, i.e. no
# SSL close notify alert is send or allowed to received.  This violates
# the SSL/TLS standard but is needed for some brain-dead browsers. Use
# this when you receive I/O errors because of the standard approach where
# mod_ssl sends the close notify alert.
#   o ssl-accurate-shutdown:
# This forces an accurate shutdown when the connection is closed, i.e. a
# SSL close notify alert is send and mod_ssl waits for the close notify
# alert of the client. This is 100% SSL/TLS standard compliant, but in
# practice often causes hanging connections with brain-dead browsers. Use
# this only for browsers where you know that their SSL implementation
# works correctly.
#   Notice: Most problems of broken clients are also related to the HTTP
#   keep-alive facility, so you usually additionally want to disable
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
#   "force-response-1.0" for this.
BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown


Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/crm.bellevetratescorrevoli.it/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/crm.bellevetratescorrevoli.it/privkey.pem
</VirtualHost>
</IfModule>
1 Like

This is not shining any light on the problem ... :frowning:
Let's have a look at the second file:
cat /etc/apache2/sites-available/p.conf
[even though it doesn't even seem to be in use]

Also, when was the last time the system was rebooted?

3 Likes

this one is not loaded:

ls -hal
total 8.0K
drwxr-xr-x 2 root root 4.0K Nov 21 11:11 .
drwxr-xr-x 8 root root 4.0K Oct 17 06:09 ..
lrwxrwxrwx 1 root root   36 Nov 21 11:03 duplicati.conf -> ../sites-available/duplicati-vt.conf
lrwxrwxrwx 1 root root   37 Nov 13  2018 vtiger-le-ssl.conf -> ../sites-available/vtiger-le-ssl.conf
lrwxrwxrwx 1 root root   30 Nov 13  2018 vtiger.conf -> ../sites-available/vtiger.conf